- Revision
- 16040
- Author
- grant
- Date
- 2007-12-04 10:19:51 -0800 (Tue, 04 Dec 2007)
Log Message
[APP] Fix the Mac missing label bug
- In general, we should use the newer wx.ToolBar.Add*LabelTool APIs
- In general, we should use the newer wx.ToolBar.Add*LabelTool APIs
Modified Paths
Diff
Modified: branches/rearchitecture/Chandler-Debugging/ocap/debugging/py_crust.py (16039 => 16040)
--- branches/rearchitecture/Chandler-Debugging/ocap/debugging/py_crust.py 2007-12-04 17:55:12 UTC (rev 16039) +++ branches/rearchitecture/Chandler-Debugging/ocap/debugging/py_crust.py 2007-12-04 18:19:51 UTC (rev 16040) @@ -44,25 +44,16 @@ widget = None, cell = None, ) - #trellis.rules( - # setup = lambda self: self.widget.Bind(wx.EVT_KILL_FOCUS, self.write), - # read = lambda self: self.widget.SetValue(unicode(self.cell)), - #) - #def write(self, event): - # self.cell = float(self.widget.GetValue()) + def addAppTool(self, label, imageName, cellValue): from ocap.wxui.image import get_raw_image toolId = wx.NewId() - tool = self.widget.AddRadioTool(toolId, + tool = self.widget.AddRadioLabelTool( + toolId, + label, wx.BitmapFromImage(get_raw_image(imageName)), clientData=cellValue) - tool.SetLabel(label) - # Eek, without the next two lines, wx doesn't draw - # the labels on the unselected tools. Probably we are - # not calling tb.Realize() at the right time [grant]. - #self.widget.ToggleTool(toolId, True) - #self.widget.ToggleTool(toolId, False) self.widget.Bind(wx.EVT_TOOL, self.OnToolEvent, id=toolId) def OnToolEvent(self, event):
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
