#include "wx/spinctrl.h"
#endif // wxUSE_SPINCTRL
+#include "wx/generic/calctrl.h"
+
//----------------------------------------------------------------------
// class definitions
//----------------------------------------------------------------------
frame->Show(TRUE);
frame->SetCursor(wxCursor(wxCURSOR_HAND));
- //frame->GetPanel()->m_notebook->SetSelection(3);
+ frame->GetPanel()->m_notebook->SetSelection(5);
SetTopWindow(frame);
m_notebook->AddPage(panel, "wxBitmapXXX");
+ panel = new wxPanel(m_notebook);
+ (void)new wxCalendarCtrl(panel, -1);
+ m_notebook->AddPage(panel, "wxCalendar");
+
// --------------- TEST CODE ----------------------
// layout constraints
EVT_MENU(TreeTest_CollapseAndReset, MyFrame::OnCollapseAndReset)
EVT_MENU(TreeTest_EnsureVisible, MyFrame::OnEnsureVisible)
EVT_MENU(TreeTest_AddItem, MyFrame::OnAddItem)
+ EVT_MENU(TreeTest_InsertItem, MyFrame::OnInsertItem)
EVT_MENU(TreeTest_IncIndent, MyFrame::OnIncIndent)
EVT_MENU(TreeTest_DecIndent, MyFrame::OnDecIndent)
EVT_MENU(TreeTest_IncSpacing, MyFrame::OnIncSpacing)
tree_menu->Append(TreeTest_CollapseAndReset, "C&ollapse and reset");
tree_menu->AppendSeparator();
tree_menu->Append(TreeTest_AddItem, "Append a &new item");
+ tree_menu->Append(TreeTest_InsertItem, "&Insert a new item");
tree_menu->Append(TreeTest_Delete, "&Delete this item");
tree_menu->Append(TreeTest_DeleteChildren, "Delete &children");
tree_menu->Append(TreeTest_DeleteAll, "Delete &all items");
CHECK_ITEM( item );
int i = m_treeCtrl->GetChildrenCount( item, FALSE );
-
+
wxLogMessage(wxT("%d children"), i);
}
CHECK_ITEM( item );
int i = m_treeCtrl->GetChildrenCount( item );
-
+
wxLogMessage(wxT("%d children"), i);
}
m_treeCtrl->DoEnsureVisible();
}
+void MyFrame::OnInsertItem(wxCommandEvent& WXUNUSED(event))
+{
+ m_treeCtrl->InsertItem(m_treeCtrl->GetRootItem(), 1, "2nd item");
+}
+
void MyFrame::OnAddItem(wxCommandEvent& WXUNUSED(event))
{
static int s_num = 0;
void OnCount(wxCommandEvent& event);
void OnCountRec(wxCommandEvent& event);
-
+
void OnRename(wxCommandEvent& event);
void OnSort(wxCommandEvent& event) { DoSort(); }
void OnSortRev(wxCommandEvent& event) { DoSort(TRUE); }
void OnAddItem(wxCommandEvent& event);
+ void OnInsertItem(wxCommandEvent& event);
void OnIncIndent(wxCommandEvent& event);
void OnDecIndent(wxCommandEvent& event);
TreeTest_CollapseAndReset,
TreeTest_EnsureVisible,
TreeTest_AddItem,
+ TreeTest_InsertItem,
TreeTest_IncIndent,
TreeTest_DecIndent,
TreeTest_IncSpacing,