Author: bugman Date: Tue Dec 28 23:37:20 2010 New Revision: 12014 URL: http://svn.gna.org/viewcvs/relax?rev=12014&view=rev Log: The setting of virtual size and scroll rate is now performed in the __init__() method. Modified: branches/bieri_gui/gui_bieri/about.py Modified: branches/bieri_gui/gui_bieri/about.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/about.py?rev=12014&r1=12013&r2=12014&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/about.py (original) +++ branches/bieri_gui/gui_bieri/about.py Tue Dec 28 23:37:20 2010 @@ -72,16 +72,8 @@ # Create a scrolled window. self.window = wx.ScrolledWindow(self, -1) - # Determine the virtual size of the window. - self.virtual_size() - # Initialise the y-offset variable. self._offset_val = 0 - - # The total size. - self.total_x = self.dim_x + 2*self.border - self.total_y = self.dim_y + 2*self.border - self.SetSize((self.total_x, self.total_y)) # The starting cursor type. self.cursor_type = 'normal' @@ -89,6 +81,18 @@ # Initialise URL data structures. self.url_text = [] self.url_pos = [] + + # Determine the virtual size of the window. + self.virtual_size() + + # Set the window size. + self.SetSize((self.virt_x, self.dim_y + 2*self.border)) + + # Set the window virtual size. + self.window.SetVirtualSize((self.virt_x, self.virt_y)) + + # Add y scrolling, if needed. + self.window.SetScrollRate(0, self.SCROLL_RATE) # Create the buffered device context. self.create_buffered_dc() @@ -465,12 +469,6 @@ self.virt_x = x + 2*self.border self.virt_y = y + 2*self.border - # Set the window virtual size. - self.window.SetVirtualSize((self.virt_x, self.virt_y)) - - # Add y scrolling, if needed. - self.window.SetScrollRate(0, self.SCROLL_RATE) - class About_gui(About_base):