changeset 2428:c2d88fe05303

core (XMLUI): added a "value" property in TextWidget
author Goffi <goffi@goffi.org>
date Sat, 11 Nov 2017 18:39:24 +0100
parents 07478106a10d
children 941fdf81958c
files src/tools/xml_tools.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/xml_tools.py	Sat Nov 11 18:35:28 2017 +0100
+++ b/src/tools/xml_tools.py	Sat Nov 11 18:39:24 2017 +0100
@@ -821,6 +821,10 @@
         value_elt.appendChild(text)
         self.elem.appendChild(value_elt)
 
+    @property
+    def value(self):
+        return self.elem.firstChild.firstChild.wholeText
+
 
 class LabelWidget(Widget):
     """One line blob of text