[GRASS-SVN] r51688 - sandbox/lucadelu

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 24 03:16:15 EDT 2012


Author: lucadelu
Date: 2012-05-24 00:16:14 -0700 (Thu, 24 May 2012)
New Revision: 51688

Modified:
   sandbox/lucadelu/r.li.setup.py
Log:
anna kratochvilova fix some problems

Modified: sandbox/lucadelu/r.li.setup.py
===================================================================
--- sandbox/lucadelu/r.li.setup.py	2012-05-23 17:53:57 UTC (rev 51687)
+++ sandbox/lucadelu/r.li.setup.py	2012-05-24 07:16:14 UTC (rev 51688)
@@ -700,47 +700,52 @@
         TitledPage.__init__(self, wizard, _("Units"))
 
         self.parent = parent
-        self.sizer.AddGrowableCol(1)
+        self.scrollPanel = scrolled.ScrolledPanel(parent = self, id = wx.ID_ANY)
+        self.scrollPanel.SetupScrolling(scroll_x = False)
+        self.sizer = wx.BoxSizer()
+        self.sizer.Add(self.scrollPanel,  proportion = 1, flag = wx.EXPAND)
+        self.panelSizer = wx.GridBagSizer(5,5)
         self.sizew = ''
         self.sizeh = ''
         # type of shape
-        self.typeBox = wx.RadioBox(parent=self, id=wx.ID_ANY,
+        self.typeBox = wx.RadioBox(parent=self.scrollPanel, id=wx.ID_ANY,
+                        majorDimension=1, style=wx.RA_SPECIFY_COLS,
 				      label= _("Select type of shape"),
-				      choices=[_('Rectangle'), _('Circle')],
-				      majorDimension=wx.RA_SPECIFY_COLS)
+				      choices=[_('Rectangle'), _('Circle')])
 
-	self.sizer.Add(self.typeBox, flag = wx.ALIGN_LEFT, pos = (1, 1))
+        self.panelSizer.Add(self.typeBox, flag = wx.ALIGN_LEFT, pos = (1, 1), span = (1, 2))
 
-        self.distributionBox = wx.RadioBox(parent=self, id=wx.ID_ANY,
+        self.distributionBox = wx.RadioBox(parent=self.scrollPanel, id=wx.ID_ANY,
+          majorDimension=1, style=wx.RA_SPECIFY_COLS,
                     label= _("Select method of sampling unit distribution"),
                     choices=[_('Random non overlapping'),
                     _('Systematic contiguos'), _('Stratified random'),
-                    _('Systematic non contiguos'), _('Centered over sites')],
-                    majorDimension=wx.RA_SPECIFY_COLS)
-        self.sizer.Add(item = self.distributionBox, pos=(2, 1),
+                    _('Systematic non contiguos'), _('Centered over sites')]
+                    )
+        self.panelSizer.Add(item = self.distributionBox, pos=(2, 1), span = (1, 2),
                     flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
 
-        self.widthLabel = wx.StaticText(parent = self, id = wx.ID_ANY,
+        self.widthLabel = wx.StaticText(parent = self.scrollPanel, id = wx.ID_ANY,
                                 label = _('Width size (in cells)? '))
-        self.widthTxt = wx.TextCtrl(parent = self, id = wx.ID_ANY, size=(250, -1))
+        self.widthTxt = wx.TextCtrl(parent = self.scrollPanel, id = wx.ID_ANY, size=(250, -1))
         
-        self.sizer.Add(item = self.widthLabel, border=5, pos=(3, 1),
+        self.panelSizer.Add(item = self.widthLabel, pos=(3, 1),
                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
-        self.sizer.Add(item = self.widthTxt, border=5, pos=(3, 2),
+        self.panelSizer.Add(item = self.widthTxt, pos=(3, 2),
                     flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
                     
-        self.heightLabel = wx.StaticText(parent = self, id = wx.ID_ANY,
+        self.heightLabel = wx.StaticText(parent = self.scrollPanel, id = wx.ID_ANY,
                                 label = _('Height size (in cells)? '))
-        self.heightTxt = wx.TextCtrl(parent = self, id = wx.ID_ANY, size=(250, -1))
+        self.heightTxt = wx.TextCtrl(parent = self.scrollPanel, id = wx.ID_ANY, size=(250, -1))
         
-        self.sizer.Add(item = self.heightLabel, border=5, pos=(4, 1),
+        self.panelSizer.Add(item = self.heightLabel, pos=(4, 1),
                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
-        self.sizer.Add(item = self.heightTxt, border=5, pos=(4, 2),
+        self.panelSizer.Add(item = self.heightTxt, pos=(4, 2),
                     flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)                    
                     
-	self.typeBox.Bind(wx.EVT_RADIOBOX, self.OnType)
+        self.typeBox.Bind(wx.EVT_RADIOBOX, self.OnType)
         #self.Bind(wiz.EVT_WIZARD_PAGE_CHANGED, self.OnEnterPage)
-      
+        self.scrollPanel.SetSizer(self.panelSizer)
     def OnType(self,event):
         try:
             self.sizer.Hide(self.widthLabel)



More information about the grass-commit mailing list