commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r9146 - trunk/gnue-forms/src/uidrivers/curses/widgets


From: johannes
Subject: [gnue] r9146 - trunk/gnue-forms/src/uidrivers/curses/widgets
Date: Tue, 12 Dec 2006 09:52:19 -0600 (CST)

Author: johannes
Date: 2006-12-12 09:52:19 -0600 (Tue, 12 Dec 2006)
New Revision: 9146

Modified:
   trunk/gnue-forms/src/uidrivers/curses/widgets/box.py
Log:
A Box migth be a container too (even for positioned layout)


Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/box.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/box.py        2006-12-12 
15:44:35 UTC (rev 9145)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/box.py        2006-12-12 
15:52:19 UTC (rev 9146)
@@ -34,6 +34,17 @@
 class UIBox(UIHelper):
 
     # -------------------------------------------------------------------------
+    # Create the widget
+    # -------------------------------------------------------------------------
+
+    def _create_widget_(self, event, spacer):
+
+        UIHelper._create_widget_(self, event, spacer)
+
+        self._parent = event.container
+        self._container = self._parent
+
+    # -------------------------------------------------------------------------
     # Define the bounding box and draw it
     # -------------------------------------------------------------------------
 
@@ -47,7 +58,12 @@
         box(self._parent, attr, self.left, self.top, self.right, self.bottom,
                 self._gfObject.label)
 
+        for child in self._children:
+            child.left = self.left + child.chr_x
+            child.top = self.top + child.chr_y
+            child.set_size_and_fit(child.chr_w, child.chr_h)
 
+
 # =============================================================================
 # Configuration data
 # =============================================================================





reply via email to

[Prev in Thread] Current Thread [Next in Thread]