void OnToolbarStyle(wxCommandEvent& event);
void OnToolLeftClick(wxCommandEvent& event);
+ void OnToolRightClick(wxCommandEvent& event);
void OnToolEnter(wxCommandEvent& event);
void OnCombo(wxCommandEvent& event);
EVT_COMBOBOX(ID_COMBO, MyFrame::OnCombo)
EVT_TOOL_ENTER(ID_TOOLBAR, MyFrame::OnToolEnter)
+ EVT_TOOL_RCLICKED(wxID_ANY, MyFrame::OnToolRightClick)
EVT_UPDATE_UI(wxID_COPY, MyFrame::OnUpdateCopyAndCut)
EVT_UPDATE_UI(wxID_CUT, MyFrame::OnUpdateCopyAndCut)
#ifdef __WXWINCE__
// On Windows CE, we should not delete the
// previous toolbar in case it contains the menubar.
- // We'll try to accomodate this usage in due course.
+ // We'll try to accommodate this usage in due course.
wxToolBar* toolBar = CreateToolBar();
#else
// delete and recreate the toolbar
// adding a combo to a vertical toolbar is not very smart
if ( m_horzToolbar )
{
- wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, _T(""), wxDefaultPosition, wxSize(200,wxDefaultSize.y) );
+ wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, _T(""), wxDefaultPosition, wxSize(200,wxDefaultCoord) );
combo->Append(_T("This"));
combo->Append(_T("is a"));
combo->Append(_T("combobox"));
int offset;
if ( m_tbar )
{
- m_tbar->SetSize(wxDefaultSize.x, size.y);
+ m_tbar->SetSize(wxDefaultCoord, size.y);
m_tbar->Move(0, 0);
offset = m_tbar->GetSize().x;
}
}
+void MyFrame::OnToolRightClick(wxCommandEvent& event)
+{
+ m_textWindow->AppendText(
+ wxString::Format(_T("Tool %d right clicked.\n"),
+ (int) event.GetInt()));
+}
+
void MyFrame::OnCombo(wxCommandEvent& event)
{
wxLogStatus(_T("Combobox string '%s' selected"), event.GetString().c_str());