파이썬[Python]: kivy - AccordionItem 클래스 - kv
kivy.uix.accordion 모듈 - AccordionItem 클래스(class)
/// 설명
Accordion과 연관된 클래스로 각 아이템을 형성합니다.
참고: uix 모듈 목록
※ 형식
AccordionItem(**kwargs)
reference
https://kivy.org/doc/stable/api-kivy.uix.accordion.html
참고: uix 모듈 목록
※ 형식
AccordionItem(**kwargs)
reference
https://kivy.org/doc/stable/api-kivy.uix.accordion.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 kv = ''' Accordion: orientation: 'vertical' AccordionItem: title: 'Title 0' Button: text: 'Content 0' size_hint: (None, None) size: (200, 200) AccordionItem: title: 'Title 1' Button: text: 'Content 1' size_hint: (None, None) size: (200, 200) AccordionItem: title: 'Title 2' Button: text: 'Content 2' size_hint: (None, None) size: (200, 200) AccordionItem: title: 'Title 3' Button: text: 'Content 3' size_hint: (None, None) size: (200, 200) AccordionItem: title: 'Title 4' Button: text: 'Content 4' size_hint: (None, None) size: (200, 200) ''' class TestApp(App): def build(self): return Builder.load_string(kv) TestApp().run() | cs |
/// 출력
* 실행환경: Microsoft Windows 10 Homes
* 인터프리터: 파이썬(Python 3.9)
– 당신을 응원합니다. –
댓글
댓글 쓰기