+ }
+}
+
+void MyFrame::OnScrollTo(wxCommandEvent& WXUNUSED(event))
+{
+ // scroll to the last but one top level child
+ wxTreeItemId item = m_treeCtrl->GetPrevSibling(
+ m_treeCtrl->GetLastChild(
+ m_treeCtrl->GetRootItem()));
+ CHECK_ITEM( item );
+
+ m_treeCtrl->ScrollTo(item);
+}
+
+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);