#endif // wxUSE_CHECKLISTBOX
}
+bool wxListBox::Create( wxWindow *parent, wxWindowID id,
+ const wxPoint &pos, const wxSize &size,
+ const wxArrayString& choices,
+ long style, const wxValidator& validator,
+ const wxString &name )
+{
+ wxCArrayString chs(choices);
+
+ return Create( parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+ style, validator, name );
+}
+
bool wxListBox::Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
int n, const wxString choices[],
DoAppend(choices[i]);
}
- // call it after appending the strings to the listbox, otherwise it doesn't
- // work correctly
- SetBestSize( size );
-
m_parent->DoAddChild( this );
- PostCreation();
-
- SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX ) );
- SetForegroundColour( parent->GetForegroundColour() );
- SetFont( parent->GetFont() );
-
- Show( TRUE );
+ PostCreation(size);
+ SetBestSize(size); // need this too because this is a wxControlWithItems
return TRUE;
}
y += widget->allocation.y;
}
+
+// static
+wxVisualAttributes
+wxListBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+ return GetDefaultAttributesFromGTKWidget(gtk_list_new, true);
+}
+
#endif // wxUSE_LISTBOX