invalidate tree size after adding/removing pages; use portable style for the tree control

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-10-10 22:30:52 +00:00
parent 3e4f8ee256
commit bc454ef84c

View File

@ -106,9 +106,8 @@ wxTreebook::Create(wxWindow *parent,
wxDefaultPosition,
wxDefaultSize,
wxBORDER_SIMPLE |
wxTR_HAS_BUTTONS |
wxTR_DEFAULT_STYLE |
wxTR_HIDE_ROOT |
wxTR_LINES_AT_ROOT |
wxTR_SINGLE
);
m_tree->AddRoot(wxEmptyString); // label doesn't matter, it's hidden
@ -214,6 +213,8 @@ bool wxTreebook::DoInsertPage(size_t pagePos,
DoUpdateSelection(bSelect, pagePos);
m_tree->InvalidateBestSize();
return true;
}
@ -263,6 +264,8 @@ bool wxTreebook::DoInsertSubPage(size_t pagePos,
DoUpdateSelection(bSelect, newPos);
m_tree->InvalidateBestSize();
return true;
}
@ -310,6 +313,7 @@ wxTreebookPage *wxTreebook::DoRemovePage(size_t pagePos)
m_tree->DeleteChildren( pageId );
m_tree->Delete( pageId );
m_tree->InvalidateBestSize();
return oldPage;
}