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;
// resize all pages to fit the new control size
const wxRect pageRect = GetPageRect();
- const unsigned pagesCount = m_pages.Count();
+ const unsigned pagesCount = m_pages.GetCount();
for ( unsigned int i = 0; i < pagesCount; ++i )
{
wxWindow * const page = m_pages[i];
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