2020-01-03から1日間の記事一覧

【Kivy】Accordion を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 Accordion: AccordionItem: title: 'item 1 title' Label: text: 'item 1 contents' AccordionItem: title: 'item 2 title' Lab…

【Kivy】RecycleView を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 RecycleView: data: [{'text': 'Item 1'}, {'text': 'Item 2'}, {'text': 'Item 3'}] viewclass: 'Label' RecycleBoxLayout: de…

【Kivy】FileChooserListView を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 FileChooserListView:

【Kivy】Scatter を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 Scatter: Image: source: 'sample.png' sample.png

【Kivy】ScreenManager を利用する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 <Screen_1@Screen>: name: 'Screen 1' BoxLayout: orientation: 'vertical' Label: text: 'Display 1' Button: size_hint_y: None height: 120 te</screen_1@screen>…

【Kivy】ScrollView を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 ScrollView: do_scroll_x: False do_scroll_y: True Label: size_hint_y: None height: self.texture_size[1] padding: 10, 10 …

【Kivy】ModalView を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 #:import Factory kivy.factory.Factory <MyModalView@ModalView>: auto_dismiss: False size_hint: .5, .5 pos_hint: {'center_x': .5, 'center_y': .5</mymodalview@modalview>…

【Kivy】ToggleButton を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 BoxLayout: ToggleButton: text: 'item 1' group: 'group 1' ToggleButton: text: 'item 2' group: 'group 1' ToggleButton: te…

【Kivy】Switch を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 Switch:

【Kivy】Slider を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 Slider: min: 0 max: 100 value: 25

【Kivy】ProgressBar を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 ProgressBar: max: 1.0 value: .5

【Kivy】Popup を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 #:import Factory kivy.factory.Factory <MyPopup@Popup>: auto_dismiss: False size_hint: .5, .5 pos_hint: {'center_x': .5, 'center_y': .5</mypopup@popup>…

【Kivy】EffectWidget を利用する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 #: import ew kivy.uix.effectwidget EffectWidget: effects: ew.InvertEffect(), ew.HorizontalBlurEffect(size=2.0) Button: …

【Kivy】Camera を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 Camera: resolution: 1280, 720

【Kivy】CodeInput を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 CodeInput:

【Kivy】Drop-DownList を表示する

main.py from kivy.app import App class MainApp(App): pass if __name__ == '__main__': MainApp().run() main.kv #:kivy 1.0 DropDown: size_hint: 1.0, 1.0 Button: text: 'My first Item' size_hint_y: None height: 80 on_release: root.select('item1…