Author: johannes
Date: 2006-03-06 08:25:55 -0600 (Mon, 06 Mar 2006)
New Revision: 8207

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
Log:
Use other way to find out which page is the first one to show


Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2006-03-06 13:59:03 UTC 
(rev 8206)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2006-03-06 14:25:55 UTC 
(rev 8207)
@@ -48,10 +48,26 @@
     self.statusBar   = None
 
     UIHelper.__init__ (self, event)
-    self._inits.extend ([self._updateSizers])
+    self._inits.extend ([self._updateSizers, self.__firstPage])
 
 
   # ---------------------------------------------------------------------------
+  # Make sure to have the first page visible
+  # ---------------------------------------------------------------------------
+
+  def __firstPage (self):
+
+    current = self._form._currentPage
+    pgList  = self._form._layout._pageList
+    if pgList and current in pgList:
+      index = pgList.index (current)
+    else:
+      index = 0
+
+    self._containerToolkitWidget.showPage (index)
+
+
+  # ---------------------------------------------------------------------------
   # Create a new wx frame widget
   # ---------------------------------------------------------------------------
 



_______________________________________________
Commit-gnue mailing list
Commit-gnue@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to