From 8ade23537a682d4b0c9709d533b25702bde2ee23 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Fri, 28 Jan 2005 02:39:09 +0000 Subject: - add listbox - add listbox example to python (press space, use 1..5) - fix label text positions --- components.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'components.py') diff --git a/components.py b/components.py index 4c26c0a0..8115ecf4 100644 --- a/components.py +++ b/components.py @@ -97,8 +97,10 @@ class GUIComponent: i = self.GUIcreateInstance(self, parent, skindata) priv["instance"] = i self.notifier.append(i) - if self.notifierAdded: + try: self.notifierAdded(i) + except: + pass # GUIdelete must delete *all* references to the current component! def GUIdelete(self, priv): @@ -221,3 +223,11 @@ class VolumeBar(HTMLComponent, GUIComponent, VariableValue): g = eSlider(parent) g.setRange(0, 100) return g + +class MenuList(HTMLComponent, GUIComponent): + def __init__(self): + GUIComponent.__init__(self) + + def GUIcreateInstance(self, priv, parent, skindata): + g = eListbox(parent) + return g -- cgit v1.2.3