-void wxNotebook::OnSelChange(wxNotebookEvent& event)
-{
- // is it our tab control?
- if ( event.GetEventObject() == this )
- {
- int sel = event.GetOldSelection();
- if ( sel != -1 )
- m_pages[sel]->Show(false);
-
- sel = event.GetSelection();
- if ( sel != -1 )
- {
- wxNotebookPage *pPage = m_pages[sel];
- pPage->Show(true);
- }
-
- // Changing the page should give the focus to it but, as per bug report
- // http://sf.net/tracker/index.php?func=detail&aid=1150659&group_id=9863&atid=109863,
- // we should not set the focus to it directly since it erroneously
- // selects radio buttons and breaks keyboard handling for a notebook's
- // scroll buttons. So give focus to the notebook and not the page.
-
- // but don't do this is the notebook is hidden
- if ( ::IsWindowVisible(GetHwnd()) )
- SetFocus();
-
- m_nSelection = sel;
- }
-
- // we want to give others a chance to process this message as well
- event.Skip();
-}
-
-bool wxNotebook::MSWTranslateMessage(WXMSG *wxmsg)