파이썬[Python]: kivy - ActionBar 클래스
kivy.uix.actionbar 모듈 - ActionBar 클래스(class)
/// 설명
/// 예제
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 | import kivy kivy.require('2.0.0') from kivy.app import App from kivy.uix.actionbar import * from kivy.uix.widget import Widget class TestApp(App): def build(self): # making ActionBar root = ActionBar(pos_hint={'top': 1}) av = ActionView() av.use_separator = True av.add_widget(ActionPrevious(title='Action Bar')) av.add_widget(ActionToggleButton(text='ToggleButton')) av.add_widget(ActionButton(text='Button1')) av.add_widget(ActionButton(text='Button2')) av.add_widget(ActionCheck()) root.add_widget(av) return root TestApp().run() | cs |
/// 출력
/// 예제
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 | import kivy kivy.require('2.0.0') from kivy.app import App from kivy.uix.actionbar import * from kivy.uix.widget import Widget class TestApp(App): def build(self): # making ActionBar root = ActionBar() av = ActionView() av.use_separator = True av.add_widget(ActionPrevious(title='Action Bar')) av.add_widget(ActionToggleButton(text='ToggleButton')) av.add_widget(ActionButton(text='Button1')) av.add_widget(ActionButton(text='Button2')) av.add_widget(ActionCheck()) root.add_widget(av) return root TestApp().run() | cs |
/// 출력
* 실행환경: Microsoft Windows 10 Homes
* 인터프리터: 파이썬(Python 3.9)
– 당신을 응원합니다. –
댓글
댓글 쓰기