ID_DELETE_MUSIC button deleted selected items so use ID_DELETE_SEL and
OnDeleteSelected() handler for it instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64956
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void OnPageChanged(wxBookCtrlEvent& event);
void OnAddMozart(wxCommandEvent& event);
void OnPageChanged(wxBookCtrlEvent& event);
void OnAddMozart(wxCommandEvent& event);
- void OnDeleteMusic(wxCommandEvent& event);
+ void OnDeleteSelected(wxCommandEvent& event);
void OnDeleteYear(wxCommandEvent& event);
void OnSelectNinth(wxCommandEvent& event);
void OnCollapse(wxCommandEvent& event);
void OnDeleteYear(wxCommandEvent& event);
void OnSelectNinth(wxCommandEvent& event);
void OnCollapse(wxCommandEvent& event);
ID_ATTR_CTRL = 51,
ID_ADD_MOZART = 100,
ID_ATTR_CTRL = 51,
ID_ADD_MOZART = 100,
ID_DELETE_YEAR = 102,
ID_SELECT_NINTH = 103,
ID_COLLAPSE = 104,
ID_DELETE_YEAR = 102,
ID_SELECT_NINTH = 103,
ID_COLLAPSE = 104,
EVT_NOTEBOOK_PAGE_CHANGED( wxID_ANY, MyFrame::OnPageChanged )
EVT_BUTTON( ID_ADD_MOZART, MyFrame::OnAddMozart )
EVT_NOTEBOOK_PAGE_CHANGED( wxID_ANY, MyFrame::OnPageChanged )
EVT_BUTTON( ID_ADD_MOZART, MyFrame::OnAddMozart )
- EVT_BUTTON( ID_DELETE_MUSIC, MyFrame::OnDeleteMusic )
+ EVT_BUTTON( ID_DELETE_SEL, MyFrame::OnDeleteSelected )
EVT_BUTTON( ID_DELETE_YEAR, MyFrame::OnDeleteYear )
EVT_BUTTON( ID_SELECT_NINTH, MyFrame::OnSelectNinth )
EVT_BUTTON( ID_COLLAPSE, MyFrame::OnCollapse )
EVT_BUTTON( ID_DELETE_YEAR, MyFrame::OnDeleteYear )
EVT_BUTTON( ID_SELECT_NINTH, MyFrame::OnSelectNinth )
EVT_BUTTON( ID_COLLAPSE, MyFrame::OnCollapse )
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( new wxButton( firstPanel, ID_ADD_MOZART, "Add Mozart"), 0, wxALL, 10 );
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( new wxButton( firstPanel, ID_ADD_MOZART, "Add Mozart"), 0, wxALL, 10 );
- button_sizer->Add( new wxButton( firstPanel, ID_DELETE_MUSIC,"Delete selected"), 0, wxALL, 10 );
+ button_sizer->Add( new wxButton( firstPanel, ID_DELETE_SEL, "Delete selected"), 0, wxALL, 10 );
button_sizer->Add( new wxButton( firstPanel, ID_DELETE_YEAR, "Delete \"Year\" column"), 0, wxALL, 10 );
button_sizer->Add( new wxButton( firstPanel, ID_SELECT_NINTH,"Select ninth symphony"), 0, wxALL, 10 );
button_sizer->Add( new wxButton( firstPanel, ID_COLLAPSE, "Collapse"), 0, wxALL, 10 );
button_sizer->Add( new wxButton( firstPanel, ID_DELETE_YEAR, "Delete \"Year\" column"), 0, wxALL, 10 );
button_sizer->Add( new wxButton( firstPanel, ID_SELECT_NINTH,"Select ninth symphony"), 0, wxALL, 10 );
button_sizer->Add( new wxButton( firstPanel, ID_COLLAPSE, "Collapse"), 0, wxALL, 10 );
m_music_model->AddToClassical( "Kleine Nachtmusik", "Wolfgang Mozart", 1787 );
}
m_music_model->AddToClassical( "Kleine Nachtmusik", "Wolfgang Mozart", 1787 );
}
-void MyFrame::OnDeleteMusic( wxCommandEvent& WXUNUSED(event) )
+void MyFrame::OnDeleteSelected( wxCommandEvent& WXUNUSED(event) )
{
wxDataViewItemArray items;
int len = m_ctrl[0]->GetSelections( items );
{
wxDataViewItemArray items;
int len = m_ctrl[0]->GetSelections( items );