# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
#self.SetToolBar(tb)
+ log.write("Default toolbar tool size: %s\n" % tb.GetToolBitmapSize())
+
self.CreateStatusBar()
tb.AddSimpleTool(10, images.getNewBitmap(), "New", "Long help for 'New'")
EVT_TOOL_RCLICKED(self, -1, self.OnToolRClick) # Match all
EVT_TIMER(self, -1, self.OnClearSB)
- if wxPlatform != "__WXMAC__":
- tb.AddSeparator()
- cbID = wxNewId()
- tb.AddControl(wxComboBox(tb, cbID, "", choices=["", "This", "is a", "wxComboBox"],
- size=(150,-1), style=wxCB_DROPDOWN))
- EVT_COMBOBOX(self, cbID, self.OnCombo)
+ tb.AddSeparator()
+ cbID = wxNewId()
+ tb.AddControl(wxComboBox(tb, cbID, "", choices=["", "This", "is a", "wxComboBox"],
+ size=(150,-1), style=wxCB_DROPDOWN))
+ EVT_COMBOBOX(self, cbID, self.OnCombo)
+ tb.AddControl(wxTextCtrl(tb, -1, "Toolbar controls!!", size=(150, -1)))
tb.Realize()
def OnToolClick(self, event):
self.log.WriteText("tool %s clicked\n" % event.GetId())
+ tb = self.GetToolBar()
+ tb.EnableTool(10, not tb.GetToolEnabled(10))
def OnToolRClick(self, event):
self.log.WriteText("tool %s right-clicked\n" % event.GetId())