파이썬[Python]: kivyMD - MDFloatingActionButton 클래스
kivymd.uix.button 모듈 - MDFloatingActionButton 클래스(class)
/// 설명 (kivy + kivyMD)
FloatingAction 버튼입니다.
참고: kivyMD extra 모듈 목록
※ 형식
MDFloatingActionButton(**kwargs)
reference
https://kivymd.readthedocs.io/en/latest/components/button/#mdfloatingactionbutton
참고: kivyMD extra 모듈 목록
※ 형식
MDFloatingActionButton(**kwargs)
reference
https://kivymd.readthedocs.io/en/latest/components/button/#mdfloatingactionbutton
/// 예제
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 | import kivy kivy.require('2.0.0') from kivy.core.window import Window from kivymd.app import MDApp from kivymd.uix.screen import MDScreen from kivymd.uix.button import MDFloatingActionButton Window.size = (563, 1001) Window.top, Window.left = 30, 700 class FantasticApp(MDApp): def build(self): # Phone-like - start ------------------------------------------------------ self.theme_cls.theme_style = 'Dark' MDs = MDScreen(pos_hint={'right': .995, 'top': .985}, size_hint=(.99, .98), radius=(50, 50, 50, 50), md_bg_color=(1, 1, 1, 1)) # Phone-like - end ------------------------------------------------------- MDs.add_widget(MDFloatingActionButton( icon='pencil', pos_hint={'center_x': .5, 'center_y': .5}, md_bg_color=self.theme_cls.primary_color, on_press=print )) return MDs FantasticApp().run() | cs |
/// 출력
* 실행환경: Microsoft Windows 10 Homes
* 인터프리터: 파이썬(Python 3.9)
– 당신을 응원합니다. –
댓글
댓글 쓰기