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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user