August 2015
Intermediate to advanced
246 pages
4h 21m
English
This recipe will give you a first look at the widgets' distribution and their interaction.
This recipe will use two common widgets, just for reference; again we'll be looking at the Button and TextInput fields. Also, a common kind of layout is BoxLayout, which controls the distribution of objects in the interface.
This recipe works by performing the following steps:
<Controller>:
label_wid: my_custom_label
BoxLayout:
orientation: 'horizontal'
padding: 20
Button:
text: 'My controller info is: ' + root.info
on_press: root.do_action()
Label:
id: my_custom_label
text: 'My label before button press'import kivy kivy.require('1.8.0') from kivy.uix.floatlayout ...Read now
Unlock full access