From: Javier Sancho Date: Wed, 25 Jul 2018 18:07:45 +0000 (+0200) Subject: Right strings in exported Kv X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=4a4f9d061b40f5c2527943af31639525d19e7798;p=kivyforms.git Right strings in exported Kv --- diff --git a/kivyforms/formcanvas.py b/kivyforms/formcanvas.py index 073587c..0f4c183 100644 --- a/kivyforms/formcanvas.py +++ b/kivyforms/formcanvas.py @@ -231,10 +231,13 @@ class FormCanvas(BoxLayout): # Widget attributes for attr in ('height', 'size_hint', 'text'): if hasattr(widget, attr): + value = getattr(widget, attr) + if type(value) is str: + value = "'" + value + "'" kv += "{indent}{attr}: {value}\n".format( indent=indent*len(stack), attr=attr, - value=getattr(widget, attr) + value=value ) return kv