Created
December 18, 2018 07:22
-
-
Save tshirtman/0ad21aaee7b669bda016898b2a40c382 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.factory import Factory as F | |
from kivy.app import App | |
from kivy.lang import Builder | |
KV = ''' | |
<ButtonLayout>: | |
on_press: print("here or there") | |
Label: | |
text: 'here' | |
Label: | |
text: 'there' | |
FloatLayout: | |
ButtonLayout: | |
size_hint: None, None | |
size: 200, 200 | |
pos_hint: {'center': (.5, .5)} | |
''' | |
class ButtonLayout(F.ButtonBehavior, F.BoxLayout): | |
pass | |
class TestApp(App): | |
def build(self): | |
return Builder.load_string(KV) | |
if __name__ == '__main__': | |
TestApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment