public wxTextEntry
{
public:
- wxComboBox() { m_strings = NULL; }
+ wxComboBox()
+ : wxChoice(), wxTextEntry()
+ {
+ Init();
+ }
wxComboBox(wxWindow *parent,
wxWindowID id,
const wxString& value = wxEmptyString,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
+ : wxChoice(), wxTextEntry()
{
+ Init();
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
+ : wxChoice(), wxTextEntry()
{
+ Init();
Create(parent, id, value, pos, size, choices, style, validator, name);
}
{
return wxItemContainer::GetStringSelection();
}
+ virtual void Popup();
+ virtual void Dismiss();
virtual void Clear()
{
// override this and return true.
virtual bool UseGTKStyleBase() const { return true; }
- // return the GtkEntry part of the combobox
- GtkEntry *GetEntry() const;
+ // Override in derived classes to create combo box widgets with
+ // custom list stores.
+ virtual void GTKCreateComboBoxWidget();
+
+ virtual GtkEntry *GetEntry() const
+ { return m_entry; }
+
+ GtkEntry* m_entry;
private:
// From wxTextEntry:
- virtual const wxWindow *GetEditableWindow() const { return this; }
+ virtual wxWindow *GetEditableWindow() { return this; }
virtual GtkEditable *GetEditable() const;
virtual void EnableTextChangedEvents(bool enable)
{
DisableEvents();
}
+ void Init();
+
DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
DECLARE_EVENT_TABLE()
};