【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')
    Label:
        text: 'Unselectable item'
        size_hint_y: None
        height: 80
    Button:
        text: 'My second Item'
        size_hint_y: None
        height: 80
        on_release: root.select('item2')

youtu.be