Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Gives me "Invalid class name" on <ImageButton> .kv line
- #.py
- from kivy.uix.behaviors import ButtonBehavior
- #..
- class ImageButton(ButtonBehavior, Image):
- pass
- class StepWidget(GridLayout):
- def __init__(self, **kwargs):
- super(StepWidget, self).__init__(**kwargs)
- #...
- def pressed(self):
- print('hooooray')
- #.kv
- # button behavior example: http://stackoverflow.com/questions/24668317/kivy-clickable-image-that-replaced-a-button
- <StepWidget>:
- size_hint_x: '1'
- cols: 1
- <ImageButton>:
- on_press: root.pressed()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement