equal
deleted
inserted
replaced
27 import wx |
27 import wx |
28 |
28 |
29 from dialogs.BrowseLocationsDialog import BrowseLocationsDialog |
29 from dialogs.BrowseLocationsDialog import BrowseLocationsDialog |
30 |
30 |
31 |
31 |
32 class LocationCellControl(wx.PyControl): |
32 class LocationCellControl(wx.Control): |
33 |
33 |
34 ''' |
34 ''' |
35 Custom cell editor control with a text box and a button that launches |
35 Custom cell editor control with a text box and a button that launches |
36 the BrowseLocationsDialog. |
36 the BrowseLocationsDialog. |
37 ''' |
37 ''' |
38 def __init__(self, parent): |
38 def __init__(self, parent): |
39 wx.PyControl.__init__(self, parent) |
39 wx.Control.__init__(self, parent) |
40 |
40 |
41 main_sizer = wx.FlexGridSizer(cols=2, hgap=0, rows=1, vgap=0) |
41 main_sizer = wx.FlexGridSizer(cols=2, hgap=0, rows=1, vgap=0) |
42 main_sizer.AddGrowableCol(0) |
42 main_sizer.AddGrowableCol(0) |
43 main_sizer.AddGrowableRow(0) |
43 main_sizer.AddGrowableRow(0) |
44 |
44 |
196 |
196 |
197 def ApplyEdit(self, row, col, grid): |
197 def ApplyEdit(self, row, col, grid): |
198 pass |
198 pass |
199 |
199 |
200 def SetSize(self, rect): |
200 def SetSize(self, rect): |
201 self.CellControl.SetDimensions(rect.x + 1, rect.y, |
201 self.CellControl.SetSize(rect.x + 1, rect.y, |
202 rect.width, rect.height, |
202 rect.width, rect.height, |
203 wx.SIZE_ALLOW_MINUS_ONE) |
203 wx.SIZE_ALLOW_MINUS_ONE) |
204 |
204 |
205 def Clone(self): |
205 def Clone(self): |
206 return LocationCellEditor(self.Table, self.Controller) |
206 return LocationCellEditor(self.Table, self.Controller) |