Mercurial > libervia-backend
comparison src/tools/common/template_xmlui.py @ 2367:9878635586f3
template (xmlui): added values property to be able to use always values even when there is only one value
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 01 Oct 2017 12:21:23 +0200 |
parents | 3acbaf5c29f5 |
children | 42a54cbc1872 |
comparison
equal
deleted
inserted
replaced
2366:c7a7e650ac2f | 2367:9878635586f3 |
---|---|
46 class ValueWidget(Widget): | 46 class ValueWidget(Widget): |
47 | 47 |
48 def __init__(self, xmlui_parent, value): | 48 def __init__(self, xmlui_parent, value): |
49 super(ValueWidget, self).__init__(xmlui_parent) | 49 super(ValueWidget, self).__init__(xmlui_parent) |
50 self.value = value | 50 self.value = value |
51 | |
52 @property | |
53 def values(self): | |
54 return [self.value] | |
51 | 55 |
52 | 56 |
53 class InputWidget(ValueWidget): | 57 class InputWidget(ValueWidget): |
54 | 58 |
55 def __init__(self, xmlui_parent, value, read_only=False): | 59 def __init__(self, xmlui_parent, value, read_only=False): |