X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..ae6a64b6af83a95769363424e09d117a96a15a4c:/src/os2/notebook.cpp?ds=sidebyside diff --git a/src/os2/notebook.cpp b/src/os2/notebook.cpp index b0765dd8e8..e0051d4fd4 100644 --- a/src/os2/notebook.cpp +++ b/src/os2/notebook.cpp @@ -22,12 +22,12 @@ #include "wx/dcclient.h" #include "wx/string.h" #include "wx/settings.h" - #include "wx/log.h" + #include "wx/log.h" + #include "wx/event.h" + #include "wx/control.h" #endif // WX_PRECOMP #include "wx/imaglist.h" -#include "wx/event.h" -#include "wx/control.h" #include "wx/os2/private.h" @@ -124,6 +124,8 @@ bool wxNotebook::Create( wxWindow* pParent, long lStyle, const wxString& rsName ) { + if ( (lStyle & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + lStyle |= wxBK_TOP; // // Base init // @@ -241,6 +243,22 @@ int wxNotebook::SetSelection( size_t nPage ) return nPage; } // end of wxNotebook::SetSelection +int wxNotebook::ChangeSelection( size_t nPage ) +{ + wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") ); + + if (nPage != (size_t)m_nSelection) + { + ::WinSendMsg( GetHWND() + ,BKM_TURNTOPAGE + ,MPFROMLONG((ULONG)m_alPageId[nPage]) + ,(MPARAM)0 + ); + } + m_nSelection = nPage; + return nPage; +} + bool wxNotebook::SetPageText( size_t nPage, const wxString& rsStrText ) {