From: Javier Sancho Date: Wed, 25 Jul 2018 17:34:01 +0000 (+0200) Subject: Export to Kv in the example editor X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=9f2dae237c0dc5c172a64fbebc75c445be456b52;p=kivyforms.git Export to Kv in the example editor --- diff --git a/examples/designer.py b/examples/designer.py index 17551ed..adeb2cb 100644 --- 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