comparison cagou/core/xmlui.py @ 236:ca86954b3788

xmlui: implemented TextBoxWidget + set height for XMLUIPanel
author Goffi <goffi@goffi.org>
date Fri, 31 Aug 2018 16:58:15 +0200
parents 525527a01439
children 661b9cf7b4e4
comparison
equal deleted inserted replaced
235:525527a01439 236:ca86954b3788
82 82
83 83
84 class StringWidget(xmlui.StringWidget, TextInput, TextInputOnChange): 84 class StringWidget(xmlui.StringWidget, TextInput, TextInputOnChange):
85 85
86 def __init__(self, xmlui_parent, value, read_only=False): 86 def __init__(self, xmlui_parent, value, read_only=False):
87 TextInput.__init__(self, text=value, multiline=False) 87 TextInput.__init__(self, text=value)
88 TextInputOnChange.__init__(self) 88 TextInputOnChange.__init__(self)
89 self.readonly = read_only 89 self.readonly = read_only
90 90
91 def _xmluiSetValue(self, value): 91 def _xmluiSetValue(self, value):
92 self.text = value 92 self.text = value
93 93
94 def _xmluiGetValue(self): 94 def _xmluiGetValue(self):
95 return self.text 95 return self.text
96
97
98 class TextBoxWidget(xmlui.TextBoxWidget, StringWidget):
99 pass
96 100
97 101
98 class JidInputWidget(xmlui.JidInputWidget, StringWidget): 102 class JidInputWidget(xmlui.JidInputWidget, StringWidget):
99 pass 103 pass
100 104