From 9f2dae237c0dc5c172a64fbebc75c445be456b52 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Wed, 25 Jul 2018 19:34:01 +0200 Subject: [PATCH] Export to Kv in the example editor --- examples/designer.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.39.5