X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d5da0ce7cb746318511b3974b7882c72c0de45e2..50c8b82054d96a9cc846d09ed98eecad07907be0:/src/os2/notebook.cpp diff --git a/src/os2/notebook.cpp b/src/os2/notebook.cpp index f518b1d11c..e0051d4fd4 100644 --- a/src/os2/notebook.cpp +++ b/src/os2/notebook.cpp @@ -24,10 +24,10 @@ #include "wx/settings.h" #include "wx/log.h" #include "wx/event.h" + #include "wx/control.h" #endif // WX_PRECOMP #include "wx/imaglist.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 ) {