X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..ffaaf1078e1bc8f03ca97782b34f8607172672bf:/src/univ/combobox.cpp diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 2a23793d7e..0cfcbcdd71 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -105,8 +105,6 @@ BEGIN_EVENT_TABLE(wxComboListBox, wxListBox) EVT_LEFT_UP(wxComboListBox::OnLeftUp) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS2(wxComboBox, wxControl, wxComboCtrl) - // ============================================================================ // implementation // ============================================================================ @@ -275,12 +273,13 @@ wxComboBox::~wxComboBox() wxString wxComboBox::DoGetValue() const { - return wxComboCtrl::GetValue(); + return GetTextCtrl() ? GetTextCtrl()->GetValue() : wxString(); } void wxComboBox::SetValue(const wxString& value) { - wxComboCtrl::SetValue(value); + if ( GetTextCtrl() ) + GetTextCtrl()->SetValue(value); } void wxComboBox::WriteText(const wxString& value) @@ -411,7 +410,7 @@ void wxComboBox::SetSelection(int n) int wxComboBox::GetSelection() const { -#if 1 // FIXME:: What is the correct behavior? +#if 1 // FIXME:: What is the correct behaviour? // if the current value isn't one of the listbox strings, return -1 return GetLBox()->GetSelection(); #else