Account for largest item in wxGenericListCtrl::GetBestSize().

Don't just return a hard-coded value but at least return something big
enough to show the largest item in the control in non-report mode.

This fixes the appearance of wxListbook which simply truncated its items
before if they didn't fit in 80 pixels horizontally.

Also switch to implementing DoGetBestClientSize() instead of DoGetBestSize()
as this method doesn't account for the control borders (it does account for
the scrollbars however).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-07-11 10:44:08 +00:00
parent 89b799cccf
commit 3dea8ba7ac
2 changed files with 57 additions and 6 deletions

View File

@@ -221,7 +221,7 @@ protected:
virtual void DoClientToScreen( int *x, int *y ) const;
virtual void DoScreenToClient( int *x, int *y ) const;
virtual wxSize DoGetBestSize() const;
virtual wxSize DoGetBestClientSize() const;
// return the text for the given column of the given item
virtual wxString OnGetItemText(long item, long column) const;