Changeset 521


Ignore:
Timestamp:
Jun 6, 2011 1:45:34 PM (12 years ago)
Author:
jemian
Message:

minor refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scat/src/scat/gui1/scatter1.py

    r512 r521  
    152152        '''
    153153        # FIXME: When do the scrollbars appear?
    154         sw = wx.lib.scrolledpanel.ScrolledPanel(id=wx.ID_ANY, parent=owner, style=wx.HSCROLL | wx.VSCROLL)
     154        sw = wx.lib.scrolledpanel.ScrolledPanel(id=wx.ID_ANY,
     155                            parent=owner, style=wx.HSCROLL | wx.VSCROLL)
    155156        sw.SetToolTipString('adjustable parameters for crystal lattice')
    156157        owner.AddPage(imageId=-1, page=sw, select=False, text='Lattice')
     
    178179                Consider a Template Method for the panel handlers.
    179180        '''
    180         sw = wx.lib.scrolledpanel.ScrolledPanel(id=wx.ID_ANY, parent=owner, style=wx.HSCROLL | wx.VSCROLL)
     181        sw = wx.lib.scrolledpanel.ScrolledPanel(id=wx.ID_ANY,
     182                            parent=owner, style=wx.HSCROLL | wx.VSCROLL)
    181183        sw.SetToolTipString('adjustable parameters for scattering particle')
    182184        owner.AddPage(imageId=-1, page=sw, select=True, text='Particle')
     
    186188        sw.SetSizer(sizer)
    187189
     190        #self.StackBuiltParticleParameters(sw, sizer)
     191
     192        sw.Fit()
     193
     194        return sw
     195
     196    def StackBuiltParticleParameters(self, sw, sizer):
    188197        # Sphere: Rin (nm), sigma (Rin), ParticleInteriorChoice
    189198        # Cylinder: Rc (nm), sigma (Rc), L (nm), ParticleInteriorChoice
     
    277286        self.StackBuilder(sw, sizer, stack)
    278287
    279         sw.Fit()
    280 
    281         return sw
    282 
    283288    def _init_notebook_Plotting(self, owner):
    284289        '''
     
    301306        :return: wx.lib.scrolledpanel.ScrolledPanel object
    302307        '''
    303         sw = wx.lib.scrolledpanel.ScrolledPanel(id=wx.ID_ANY, parent=owner, style=wx.HSCROLL | wx.VSCROLL)
     308        sw = wx.lib.scrolledpanel.ScrolledPanel(id=wx.ID_ANY,
     309                            parent=owner, style=wx.HSCROLL | wx.VSCROLL)
    304310        owner.AddPage(imageId=-1, page=sw, select=False, text='Plot')
    305311
     
    473479                # define its content now
    474480                for i in range(len(choices)):
    475                     sw = wx.lib.scrolledpanel.ScrolledPanel(id=wx.ID_ANY, parent=widget, style=wx.HSCROLL | wx.VSCROLL)
     481                    sw = wx.lib.scrolledpanel.ScrolledPanel(id=wx.ID_ANY,
     482                                        parent=widget, style=wx.HSCROLL | wx.VSCROLL)
    476483                    widget.AddPage(imageId=-1, page=sw, select=False, text=choices[i])
    477484
Note: See TracChangeset for help on using the changeset viewer.