【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:
        text: 'item 3'
        group: 'group 1'