projects
/
kivyforms.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16f4500
)
Export to Kv in the example editor
author
Javier Sancho
<jsf@jsancho.org>
Wed, 25 Jul 2018 17:34:01 +0000
(19:34 +0200)
committer
Javier Sancho
<jsf@jsancho.org>
Wed, 25 Jul 2018 17:34:01 +0000
(19:34 +0200)
examples/designer.py
patch
|
blob
|
history
diff --git
a/examples/designer.py
b/examples/designer.py
index 17551edb24de779c9b8e44d0ae61f0bdaeab907c..adeb2cbc3f8999212070283b735fd31331023232 100644
(file)
--- a/
examples/designer.py
+++ b/
examples/designer.py
@@
-18,6
+18,9
@@
BoxLayout:
Button:
text: 'Add label'
on_press: app.add_label()
+ Button:
+ text: 'Export to Kv'
+ on_press: app.export_to_kv()
''')
class DesignerApp(App):
@@
-35,6
+38,9
@@
class DesignerApp(App):
self.label_id += 1
self.form_canvas.add_widget(Label(text='Label ' + str(self.label_id)))
+ def export_to_kv(self):
+ print(self.form_canvas.export_to_kv())
+
def build(self):
return screen