self.toolbar = self.CreateToolBar(wx.TB_HORIZONTAL |
wx.NO_BORDER | wx.TB_FLAT)
self.toolbar.AddSimpleTool(wx.ID_NEW,
self.toolbar = self.CreateToolBar(wx.TB_HORIZONTAL |
wx.NO_BORDER | wx.TB_FLAT)
self.toolbar.AddSimpleTool(wx.ID_NEW,
"Save")
self.toolbar.AddSeparator()
self.toolbar.AddSimpleTool(menu_UNDO,
"Save")
self.toolbar.AddSeparator()
self.toolbar.AddSimpleTool(menu_UNDO,
"Undo")
self.toolbar.AddSeparator()
self.toolbar.AddSimpleTool(menu_DUPLICATE,
"Undo")
self.toolbar.AddSeparator()
self.toolbar.AddSimpleTool(menu_DUPLICATE,
if iconID == id_SELECT: self.doChooseSelectTool()
elif iconID == id_LINE: self.doChooseLineTool()
elif iconID == id_RECT: self.doChooseRectTool()
if iconID == id_SELECT: self.doChooseSelectTool()
elif iconID == id_LINE: self.doChooseLineTool()
elif iconID == id_RECT: self.doChooseRectTool()
""" An icon appearing in the tool palette area of our sketching window.
Note that this is actually implemented as a wx.Bitmap rather
""" An icon appearing in the tool palette area of our sketching window.
Note that this is actually implemented as a wx.Bitmap rather
The icon name is used to get the appropriate bitmap for this icon.
"""
bmp = wx.Bitmap("images/" + iconName + "Icon.bmp", wx.BITMAP_TYPE_BMP)
The icon name is used to get the appropriate bitmap for this icon.
"""
bmp = wx.Bitmap("images/" + iconName + "Icon.bmp", wx.BITMAP_TYPE_BMP)
- wx.BitmapButton.__init__(self, parent, iconID, bmp, wx.DefaultPosition,
+ GenBitmapButton.__init__(self, parent, iconID, bmp, wx.DefaultPosition,
wx.Size(bmp.GetWidth(), bmp.GetHeight()))
self.SetToolTip(wx.ToolTip(toolTip))
wx.Size(bmp.GetWidth(), bmp.GetHeight()))
self.SetToolTip(wx.ToolTip(toolTip))