+void MyFrame::OnIdle(wxIdleEvent& event)
+{
+#if wxUSE_STATUSBAR
+ if ( m_treeCtrl )
+ {
+ wxTreeItemId idRoot = m_treeCtrl->GetRootItem();
+
+ SetStatusText(wxString::Format
+ (
+ _T("Root/last item is %svisible/%svisible"),
+ m_treeCtrl->IsVisible(idRoot) ? _T("") : _T("not "),
+ m_treeCtrl->IsVisible(m_treeCtrl->GetLastChild(idRoot))
+ ? _T("") : _T("not ")
+ ), 1);
+ }
+#endif // wxUSE_STATUSBAR
+
+ event.Skip();
+}
+