const wxCoord MARGIN = 5;
// ----------------------------------------------------------------------------
-// various wxWindows macros
+// various wxWidgets macros
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxListbook, wxControl)
m_line = new wxStaticLine
(
this,
- -1,
+ wxID_ANY,
wxDefaultPosition,
wxDefaultSize,
IsVertical() ? wxLI_HORIZONTAL : wxLI_VERTICAL
if ( (int)n != m_selection )
{
- m_selection = n;
+ m_list->Select(n);
+ m_list->Focus(n);
- m_list->Select(m_selection);
- m_list->Focus(m_selection);
+ // change m_selection only now, otherwise OnListSelected() would ignore
+ // the selection change event
+ m_selection = n;
}
return selOld;
page->Hide();
}
+ InvalidateBestSize();
return true;
}