X-Git-Url: https://git.jsancho.org/?p=kivyforms.git;a=blobdiff_plain;f=kivyforms%2Fformcanvas.py;fp=kivyforms%2Fformcanvas.py;h=0f4c18302cb6a97fd4170a960763da1c642ef77f;hp=073587c0217f827fe3caddf9fb60717d43b1a7b1;hb=4a4f9d061b40f5c2527943af31639525d19e7798;hpb=9f2dae237c0dc5c172a64fbebc75c445be456b52 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