파이썬[Python]: kivy - ActionButton 클래스 - kv
kivy.uix.actionbar 모듈 - ActionButton 클래스(class)
/// 설명
ActionBar의 하위 위젯중 하나입니다. 버튼의 역활을 합니다.
참고: uix 모듈 목록
※ 형식
ActionButton(**kwargs)
reference
https://kivy.org/doc/stable/api-kivy.uix.actionbar.html
참고: uix 모듈 목록
※ 형식
ActionButton(**kwargs)
reference
https://kivy.org/doc/stable/api-kivy.uix.actionbar.html
/// 예제
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | import kivy kivy.require('2.0.0') from kivy.app import App from kivy.lang import Builder from kivy.core.window import Window Window.clearcolor = (.5, .0, .5, .1) Window.size = (563, 1001) Window.top, Window.left = 30, 800 kv = ''' BoxLayout: orientation: 'vertical' ActionBar: pos_hint: {'top': 1} ActionView: use_separator: True ActionPrevious: title: 'Action Bar' ActionButton: text: 'Button' on_press: app.abt_press(self, id_lb) on_release: app.abt_release(self, id_lb) Label: id: id_lb text: 'GUI Programming, It is interesting' font_size: 35 ''' class TestApp(App): def abt_press(self, abt_instance, id_lb): print(abt_instance) id_lb.text = 'Is\'n it?' def abt_release(self, abt_instance, id_lb): print(abt_instance) id_lb.text = 'GUI Programming, It is interesting' def build(self): return Builder.load_string(kv) TestApp().run() | cs |
/// 출력
* 실행환경: Microsoft Windows 10 Homes
* 인터프리터: 파이썬(Python 3.9)
– 당신을 응원합니다. –
cenmaQli_no Jessica Wright Camtasia Studio
답글삭제Fraps
Kaspersky Total Security
workpulinthumb
UsainaPcont_ze Erica Cain Link
답글삭제Click
scoutareshos