use DoGetValue() in parent class will be enough, and add readonly support to SetValue()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
26ce3d6361
commit
02526cc9d2
@ -163,8 +163,6 @@ public:
|
||||
virtual void SetClientDataType(wxClientDataType clientDataItemsType) wxOVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual wxString DoGetValue() const wxOVERRIDE;
|
||||
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type) wxOVERRIDE;
|
||||
|
@ -270,17 +270,12 @@ wxComboBox::~wxComboBox()
|
||||
// wxComboBox methods forwarded to wxTextCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxString wxComboBox::DoGetValue() const
|
||||
{
|
||||
return GetTextCtrl() ? GetTextCtrl()->GetValue() : m_valueString;
|
||||
}
|
||||
|
||||
void wxComboBox::SetValue(const wxString& value)
|
||||
{
|
||||
if ( GetTextCtrl() )
|
||||
GetTextCtrl()->SetValue(value);
|
||||
if ( HasFlag(wxCB_READONLY) )
|
||||
SetStringSelection(value);
|
||||
else
|
||||
m_valueString = value;
|
||||
GetTextCtrl()->SetValue(value);
|
||||
}
|
||||
|
||||
void wxComboBox::WriteText(const wxString& value)
|
||||
|
Loading…
Reference in New Issue
Block a user