]> git.jsancho.org Git - kivyforms.git/blobdiff - examples/designer.py
Export to Kv in the example editor
[kivyforms.git] / examples / designer.py
index 17551edb24de779c9b8e44d0ae61f0bdaeab907c..adeb2cbc3f8999212070283b735fd31331023232 100644 (file)
@@ -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