Changeset 572d4be in sasview for guitools


Ignore:
Timestamp:
Jul 9, 2008 11:33:36 AM (16 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
2509e86
Parents:
7a2feab
Message:

Mac compatibility

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guitools/PropertyDialog.py

    r6a8adb0 r572d4be  
    77class Properties(wx.Dialog): 
    88    def __init__(self, parent, id, title): 
    9         wx.Dialog.__init__(self, parent, id, "Select the scale of the graph", size=(350, 190)) 
     9        wx.Dialog.__init__(self, parent, id, "Select the scale of the graph") 
    1010        """ 
    1111            for the properties window 
    1212        """ 
    1313        self.parent = parent 
    14         panel = wx.Panel(self, -1, style=wx.SIMPLE_BORDER)    
    1514        vbox  = wx.BoxSizer(wx.VERTICAL) 
    16         sizer = wx.GridBagSizer(5,0) 
    17         vbox.Add(panel, 1, wx.EXPAND | wx.ALL) 
     15        sizer = wx.GridBagSizer(5,5) 
     16 
     17        x_size = 70 
    1818 
    1919        ix = 1 
    2020        iy = 1 
    21         sizer.Add(wx.StaticText(panel, -1, 'X'),(iy, ix)) 
     21        sizer.Add(wx.StaticText(self, -1, 'X'),(iy, ix)) 
    2222        ix += 2 
    23         sizer.Add(wx.StaticText(panel, -1, 'Y'),(iy, ix)) 
     23        sizer.Add(wx.StaticText(self, -1, 'Y'),(iy, ix)) 
    2424        ix += 2 
    25         sizer.Add(wx.StaticText(panel, -1, 'View'),(iy, ix)) 
     25        sizer.Add(wx.StaticText(self, -1, 'View'),(iy, ix)) 
    2626        iy += 1 
    2727        ix = 1 
    28         self.xvalue = wx.ComboBox(panel, -1) 
    29         sizer.Add(self.xvalue,(iy,ix)) 
     28        self.xvalue = wx.ComboBox(self, -1) 
     29        x_size += self.xvalue.GetSize()[0] 
     30        sizer.Add(self.xvalue,(iy,ix), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
     31         
    3032        ix +=2 
    31         self.yvalue = wx.ComboBox(panel, -1) 
    32         sizer.Add( self.yvalue,(iy, ix)) 
     33        self.yvalue = wx.ComboBox(self, -1) 
     34        x_size += self.yvalue.GetSize()[0] 
     35        sizer.Add( self.yvalue,(iy, ix), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
     36         
    3337        ix +=2 
    34         self.view =wx.ComboBox(panel, -1) 
    35         sizer.Add(self.view,(iy,ix)) 
     38        self.view =wx.ComboBox(self, -1) 
     39        x_size += self.view.GetSize()[0] 
     40        sizer.Add(self.view,(iy,ix), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    3641         
     42        self.SetMinSize((x_size,50)) 
     43         
     44        vbox.Add(sizer, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
     45        
    3746        
    3847        btCancel=wx.Button(self, wx.ID_CANCEL,'Cancel' ) 
     
    4352        sizer_button.Add(btOk, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) 
    4453        sizer_button.Add(btCancel, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)         
    45         vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10) 
     54        vbox.Add(sizer_button, 0, wx.EXPAND|wx.TOP|wx.BOTTOM|wx.ADJUST_MINSIZE, 10) 
    4655  
    4756         
     
    6978        self.view.Insert("--",0) 
    7079        self.view.Insert("Guinier lny vs x^(2)",1) 
    71         panel.SetSizer(sizer) 
     80         
    7281        self.SetSizer(vbox) 
     82         
     83        self.Fit()         
    7384        self.Centre() 
     85        self.CaptureMouse() 
    7486            
    7587         
Note: See TracChangeset for help on using the changeset viewer.