comparison src/tools/xml_tools.py @ 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 8b37a62336c3
children 941fdf81958c
comparison
equal deleted inserted replaced
2427:07478106a10d 2428:c2d88fe05303
819 value_elt = self.xmlui.doc.createElement('value') 819 value_elt = self.xmlui.doc.createElement('value')
820 text = self.xmlui.doc.createTextNode(value) 820 text = self.xmlui.doc.createTextNode(value)
821 value_elt.appendChild(text) 821 value_elt.appendChild(text)
822 self.elem.appendChild(value_elt) 822 self.elem.appendChild(value_elt)
823 823
824 @property
825 def value(self):
826 return self.elem.firstChild.firstChild.wholeText
827
824 828
825 class LabelWidget(Widget): 829 class LabelWidget(Widget):
826 """One line blob of text 830 """One line blob of text
827 831
828 used most of time to display the desciption or name of the next widget 832 used most of time to display the desciption or name of the next widget