{
public:
// ctors and such
- wxListBox();
+ wxListBox() { Init(); }
wxListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr)
{
+ Init();
+
Create(parent, id, pos, size, n, choices, style, validator, name);
}
wxListBox(wxWindow *parent, wxWindowID id,
#endif
private:
+ // common part of all ctors
+ void Init();
+
// call this when items are added to or deleted from the listbox or an
// items text changes
void MSWOnItemsChanged();
// creation
// ----------------------------------------------------------------------------
-// Listbox item
-wxListBox::wxListBox()
+void wxListBox::Init()
{
m_noItems = 0;
m_updateHorizontalExtent = false;
const wxValidator& validator,
const wxString& name)
{
- m_noItems = 0;
- m_updateHorizontalExtent = false;
-
// initialize base class fields
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
return false;