Browse files

Example 48: Use multiple inheritance to gain button-like and layout-l…

…ike qualities simultaneously.

I'm shocked that this works, and I really really hope it's future-proof. But it's a really elegant solution as long as it works.
  • Loading branch information...
1 parent 434cc3e commit 3b41931d8a1a3fb482f6c26db43809e56963ef03 Dusty Phillips committed Jul 17, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 orkiv/
@@ -9,6 +9,7 @@
from kivy.uix.modalview import ModalView
from kivy.uix.label import Label
from kivy.uix.button import Button
+from kivy.uix.listview import ListItemButton
from kivy.uix.boxlayout import BoxLayout
@@ -62,7 +63,7 @@ def login(self):
-class BuddyListItem(BoxLayout):
+class BuddyListItem(BoxLayout, ListItemButton):
jabberid = StringProperty()
full_name = StringProperty()
status_message = StringProperty()

0 comments on commit 3b41931

Please sign in to comment.