int GetState(const wxTreeItemId& node);
protected:
+ virtual wxSize DoGetBestSize() const;
+
+
// SetImageList helper
void SetAnyImageList(wxImageList *imageList, int which);
}
}
+wxSize wxTreeCtrl::DoGetBestSize() const
+{
+ wxSize size;
+ wxRect rect;
+ for ( wxTreeItemId node = GetFirstVisibleItem();
+ node.IsOk();
+ node = GetNextVisible(node) )
+ {
+ if ( GetBoundingRect(node, rect) )
+ {
+ if ( size.x < rect.x + rect.width )
+ size.x = rect.x + rect.width;
+ if ( size.y < rect.y + rect.height )
+ size.y = rect.y + rect.height;
+ }
+ }
+
+ return size;
+}
+
// ----------------------------------------------------------------------------
// sorting stuff
// ----------------------------------------------------------------------------