Minor formating
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1071,29 +1071,34 @@ void MyFrame::OnAddMany(wxCommandEvent& WXUNUSED(event))
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// MyFrame - event handlers for the fourth page
|
// MyFrame - event handlers for the fourth page
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void MyFrame::OnDeleteTreeItem(wxCommandEvent& WXUNUSED(event)) {
|
|
||||||
|
void MyFrame::OnDeleteTreeItem(wxCommandEvent& WXUNUSED(event))
|
||||||
|
{
|
||||||
wxDataViewTreeCtrl* ctrl = (wxDataViewTreeCtrl*) m_ctrl[3];
|
wxDataViewTreeCtrl* ctrl = (wxDataViewTreeCtrl*) m_ctrl[3];
|
||||||
wxDataViewItem selected = ctrl->GetSelection();
|
wxDataViewItem selected = ctrl->GetSelection();
|
||||||
if (!selected.IsOk()) {
|
if (!selected.IsOk())
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
ctrl->DeleteItem(selected);
|
ctrl->DeleteItem(selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnDeleteAllTreeItems(wxCommandEvent& WXUNUSED(event)) {
|
void MyFrame::OnDeleteAllTreeItems(wxCommandEvent& WXUNUSED(event))
|
||||||
|
{
|
||||||
wxDataViewTreeCtrl* ctrl = (wxDataViewTreeCtrl*) m_ctrl[3];
|
wxDataViewTreeCtrl* ctrl = (wxDataViewTreeCtrl*) m_ctrl[3];
|
||||||
ctrl->DeleteAllItems();
|
ctrl->DeleteAllItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnAddTreeItem(wxCommandEvent& WXUNUSED(event)) {
|
void MyFrame::OnAddTreeItem(wxCommandEvent& WXUNUSED(event))
|
||||||
|
{
|
||||||
wxDataViewTreeCtrl* ctrl = (wxDataViewTreeCtrl*) m_ctrl[3];
|
wxDataViewTreeCtrl* ctrl = (wxDataViewTreeCtrl*) m_ctrl[3];
|
||||||
wxDataViewItem selected = ctrl->GetSelection();
|
wxDataViewItem selected = ctrl->GetSelection();
|
||||||
ctrl->AppendItem(selected, wxString(wxT("Item")), 0);
|
ctrl->AppendItem( selected, "Item", 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnAddTreeContainerItem(wxCommandEvent& WXUNUSED(event)) {
|
void MyFrame::OnAddTreeContainerItem(wxCommandEvent& WXUNUSED(event))
|
||||||
|
{
|
||||||
wxDataViewTreeCtrl* ctrl = (wxDataViewTreeCtrl*) m_ctrl[3];
|
wxDataViewTreeCtrl* ctrl = (wxDataViewTreeCtrl*) m_ctrl[3];
|
||||||
wxDataViewItem selected = ctrl->GetSelection();
|
wxDataViewItem selected = ctrl->GetSelection();
|
||||||
ctrl->AppendContainer(selected, wxString(wxT("Container")), 0);
|
ctrl->AppendContainer(selected, "Container", 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user