August 2015
Intermediate to advanced
246 pages
4h 21m
English
This recipe will teach you how to take advantage of reusing styles for different widgets, a procedure that could be useful for the scalability of a system.
We will use this example of a file, e8.kv, where two widgets are defined:
<MyWidget1>:
Button:
on_press: self.text(txt_inpt.text)
TextInput:
id: txt_inpt
<MyWidget2>:
Button:
on_press: self.text(txt_inpt.text)
TextInput:
id: txt_inptWe must note that they are very similar, and actually just the name of the widget is different between them.
The following steps provide a way to join the two widgets:
Read now
Unlock full access