+void MyFrame::OnSelectLast(wxCommandEvent& WXUNUSED(event))
+{
+ // select the very last item of the tree
+ wxTreeItemId item = m_treeCtrl->GetRootItem();
+ for ( ;; )
+ {
+ wxTreeItemId itemChild = m_treeCtrl->GetLastChild(item);
+ if ( !itemChild.IsOk() )
+ break;
+
+ item = itemChild;
+ }
+
+ CHECK_ITEM( item );
+
+ m_treeCtrl->SelectItem(item);
+}
+