// under MSW, we'd finish with an ugly looking list control with both
// vertical and horizontal scrollbar (with one of them being added because
// the other one is not accounted for in client size computations)
- wxListView *list = GetListView();
- if (list) list->Arrange();
- wxBookCtrlBase::OnSize(event);
+ wxListView * const list = GetListView();
+ if ( list )
+ list->Arrange();
+
+ event.Skip();
}
int wxListbook::HitTest(const wxPoint& pt, long *flags) const
return size;
}
+void wxListbook::UpdateSize()
+{
+ // we should find a more elegant way to force a layout than generating this
+ // dummy event
+ wxSizeEvent sz(GetSize(), GetId());
+ GetEventHandler()->ProcessEvent(sz);
+}
// ----------------------------------------------------------------------------
// accessing the pages
if ( selNew != -1 )
SetSelection(selNew);
- wxSizeEvent sz(GetSize(), GetId());
- GetEventHandler()->ProcessEvent(sz);
-
+ UpdateSize();
+
return true;
}
}
GetListView()->Arrange();
- if (GetPageCount() == 0)
- {
- wxSizeEvent sz(GetSize(), GetId());
- GetEventHandler()->ProcessEvent(sz);
- }
+ UpdateSize();
}
return win;
m_selection = -1;
- wxSizeEvent sz(GetSize(), GetId());
- GetEventHandler()->ProcessEvent(sz);
+ UpdateSize();
return true;
}