Skip to content

Instantly share code, notes, and snippets.

@el3
Last active May 19, 2018 13:23
Show Gist options
  • Save el3/869d089719b517250c3e808847b4532f to your computer and use it in GitHub Desktop.
Save el3/869d089719b517250c3e808847b4532f to your computer and use it in GitHub Desktop.
from kivy.base import runTouchApp
from kivy.uix.spinner import Spinner
from kivy.lang import Builder
KV = """
BoxLayout:
orientation: "vertical"
RelativeLayout:
MySpinner:
pos_hint: {"top":1}
text: "Test"
values: ["test1", "test2", "test3", "test4"]
size_hint_x: .25
size_hint_y: .25
Button:
text: "test button"
"""
class MySpinner(Spinner):
def __init__(self,**kwargs):
super(MySpinner,self).__init__(**kwargs)
self.dropdown_cls.pos_hint = {"right":0.5,"top":1}
runTouchApp(Builder.load_string(KV))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment