switch ( GetWindowStyle() & wxBK_ALIGN_MASK )
{
default:
- wxFAIL_MSG( _T("unexpected alignment") );
+ wxFAIL_MSG( wxT("unexpected alignment") );
// fall through
case wxBK_TOP:
sizeCtrl( GetControllerSize() );
m_bookctrl->SetClientSize( sizeCtrl.x - sizeBorder.x, sizeCtrl.y - sizeBorder.y );
+ // if this changes the visibility of the scrollbars the best size changes, relayout in this case
+ wxSize sizeCtrl2 = GetControllerSize();
+ if ( sizeCtrl != sizeCtrl2 )
+ {
+ wxSize sizeBorder2 = m_bookctrl->GetSize() - m_bookctrl->GetClientSize();
+ m_bookctrl->SetClientSize( sizeCtrl2.x - sizeBorder2.x, sizeCtrl2.y - sizeBorder2.y );
+ }
const wxSize sizeNew = m_bookctrl->GetSize();
wxPoint posCtrl;
switch ( GetWindowStyle() & wxBK_ALIGN_MASK )
{
default:
- wxFAIL_MSG( _T("unexpected alignment") );
+ wxFAIL_MSG( wxT("unexpected alignment") );
// fall through
case wxBK_TOP:
if ( !page )
{
wxASSERT_MSG( AllowNullPage(),
- _T("Null page in a control that does not allow null pages?") );
+ wxT("Null page in a control that does not allow null pages?") );
continue;
}
int WXUNUSED(imageId))
{
wxCHECK_MSG( page || AllowNullPage(), false,
- _T("NULL page in wxBookCtrlBase::InsertPage()") );
+ wxT("NULL page in wxBookCtrlBase::InsertPage()") );
wxCHECK_MSG( nPage <= m_pages.size(), false,
- _T("invalid page index in wxBookCtrlBase::InsertPage()") );
+ wxT("invalid page index in wxBookCtrlBase::InsertPage()") );
m_pages.Insert(page, nPage);
if ( page )
wxWindow *wxBookCtrlBase::DoRemovePage(size_t nPage)
{
wxCHECK_MSG( nPage < m_pages.size(), NULL,
- _T("invalid page index in wxBookCtrlBase::DoRemovePage()") );
+ wxT("invalid page index in wxBookCtrlBase::DoRemovePage()") );
wxWindow *pageRemoved = m_pages[nPage];
m_pages.RemoveAt(nPage);
if ( n != (size_t)oldSel )
{
- wxBookCtrlBaseEvent *event = CreatePageChangingEvent();
+ wxBookCtrlEvent *event = CreatePageChangingEvent();
bool allowed = false;
if ( flags & SetSelection_SendEvent )
return oldSel;
}
+IMPLEMENT_DYNAMIC_CLASS(wxBookCtrlEvent, wxNotifyEvent)
#endif // wxUSE_BOOKCTRL