"selection changed" events are not generated any more when notebook
changes size git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -364,11 +364,13 @@ bool wxNotebook::InsertPage(int nPage,
|
|||||||
|
|
||||||
void wxNotebook::OnSize(wxSizeEvent& event)
|
void wxNotebook::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
// emulate page change (it's esp. important to do it first time because
|
// make sure the current page is shown and has focus (it's useful because all
|
||||||
// otherwise our page would stay invisible)
|
// pages are created invisible initially)
|
||||||
int nSel = m_nSelection;
|
if ( m_nSelection != -1 ) {
|
||||||
m_nSelection = -1;
|
wxNotebookPage *pPage = m_aPages[m_nSelection];
|
||||||
SetSelection(nSel);
|
pPage->Show(TRUE);
|
||||||
|
pPage->SetFocus();
|
||||||
|
}
|
||||||
|
|
||||||
// fit the notebook page to the tab control's display area
|
// fit the notebook page to the tab control's display area
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
Reference in New Issue
Block a user