Skip to content

Instantly share code, notes, and snippets.

@mike-perdide
Created November 22, 2012 22:15
Show Gist options
  • Select an option

  • Save mike-perdide/4133125 to your computer and use it in GitHub Desktop.

Select an option

Save mike-perdide/4133125 to your computer and use it in GitHub Desktop.
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.dropdown import DropDown
from kivy.lang import Builder
Builder.load_string("""
<ComboBox>
cols: 1
DropDown:
Button:
text: 'My first Item'
Label:
text: 'Unselectable item'
Button:
text: 'My second Item'
""")
class ComboBox(BoxLayout):
def __init__(self):
BoxLayout.__init__(self)
if __name__ == "__main__":
class TestApp(App):
def build(self):
widget = ComboBox()
return widget
TestApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment