Fixed tree book controller sizing by invalidating size after first

insertion, and also allowing full size calculation.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-05-18 09:33:17 +00:00
parent acead93d81
commit 7c3840677c
3 changed files with 53 additions and 13 deletions

View File

@@ -105,6 +105,7 @@ wxTreebook::Create(wxWindow *parent,
wxTR_HIDE_ROOT |
wxTR_SINGLE
);
GetTreeCtrl()->SetQuickBestSize(false); // do full size calculation
GetTreeCtrl()->AddRoot(wxEmptyString); // label doesn't matter, it's hidden
#ifdef __WXMSW__
@@ -244,6 +245,8 @@ bool wxTreebook::DoInsertSubPage(size_t pagePos,
wxTreeItemId newId = tree->AppendItem(parentId, text, imageId);
tree->InvalidateBestSize();
if ( !newId.IsOk() )
{
(void)wxBookCtrlBase::DoRemovePage(newPos);