파이썬[Python]: kivy - ModalView 클래스
kivy.uix.modalview 모듈 - ModalView 클래스(class)
/// 설명
모달뷰를 생성합니다.
참고: uix 모듈 목록
※ 형식
ModalView(**kwargs)
reference
https://kivy.org/doc/stable/api-kivy.uix.modalview.html
참고: uix 모듈 목록
※ 형식
ModalView(**kwargs)
reference
https://kivy.org/doc/stable/api-kivy.uix.modalview.html
/// 예제 자동소멸
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import kivy kivy.require('2.0.0') from kivy.app import App from kivy.core.window import Window from kivy.uix.modalview import ModalView from kivy.uix.label import Label Window.clearcolor = (.5, .5, 1, .5) class TestApp(App): def build(self): # ModalView mv = ModalView(size_hint=(None, None), size=(300, 300)) mv.add_widget(Label(text='GUI Programming, It is interesting')) return mv.open() 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 | import kivy kivy.require('2.0.0') from kivy.app import App from kivy.core.window import Window from kivy.uix.modalview import ModalView from kivy.uix.label import Label Window.clearcolor = (.5, .5, 1, .5) class TestApp(App): def build(self): # ModalView mv = ModalView(auto_dismiss=False, size_hint=(None, None), size=(300, 300)) mv.add_widget(Label(text='GUI Programming, It is interesting')) return mv.open() TestApp().run() | cs |
/// 출력
* 실행환경: Microsoft Windows 10 Homes
* 인터프리터: 파이썬(Python 3.9)
– 당신을 응원합니다. –
댓글
댓글 쓰기