Author: bugman Date: Fri Jun 17 10:14:24 2011 New Revision: 13079 URL: http://svn.gna.org/viewcvs/relax?rev=13079&view=rev Log: Created the Wiz_window.display_page() method for displaying the given page. Modified: branches/gui_testing/gui/wizard.py Modified: branches/gui_testing/gui/wizard.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/wizard.py?rev=13079&r1=13078&r2=13079&view=diff ============================================================================== --- branches/gui_testing/gui/wizard.py (original) +++ branches/gui_testing/gui/wizard.py Fri Jun 17 10:14:24 2011 @@ -782,17 +782,28 @@ self.pages.append(panel) + def display_page(self, i): + """Display the given page. + + @param i: The index of the page to display. + @type i: int + """ + + # Destroy all of the original contents. + self.main_sizer.Clear(deleteWindows=True) + + # Add the page. + self.main_sizer.Add(self.pages[i]) + + # Re-perform the window layout. + self.Layout() + self.Refresh() + + def run(self): """Execute the wizard.""" # Loop over the pages. for i in range(len(self.pages)): - # Destroy all of the original contents. - self.main_sizer.Clear(deleteWindows=True) - - # Add the page. - self.main_sizer.Add(self.pages[i]) - - # Re-perform the window layout. - self.Layout() - self.Refresh() + # Display the page. + self.display_page(i)