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:
@@ -163,8 +163,6 @@ public:
|
|||||||
virtual void SetClientDataType(wxClientDataType clientDataItemsType) wxOVERRIDE;
|
virtual void SetClientDataType(wxClientDataType clientDataItemsType) wxOVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual wxString DoGetValue() const wxOVERRIDE;
|
|
||||||
|
|
||||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||||
unsigned int pos,
|
unsigned int pos,
|
||||||
void **clientData, wxClientDataType type) wxOVERRIDE;
|
void **clientData, wxClientDataType type) wxOVERRIDE;
|
||||||
|
@@ -270,17 +270,12 @@ wxComboBox::~wxComboBox()
|
|||||||
// wxComboBox methods forwarded to wxTextCtrl
|
// wxComboBox methods forwarded to wxTextCtrl
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxString wxComboBox::DoGetValue() const
|
|
||||||
{
|
|
||||||
return GetTextCtrl() ? GetTextCtrl()->GetValue() : m_valueString;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxComboBox::SetValue(const wxString& value)
|
void wxComboBox::SetValue(const wxString& value)
|
||||||
{
|
{
|
||||||
if ( GetTextCtrl() )
|
if ( HasFlag(wxCB_READONLY) )
|
||||||
GetTextCtrl()->SetValue(value);
|
SetStringSelection(value);
|
||||||
else
|
else
|
||||||
m_valueString = value;
|
GetTextCtrl()->SetValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboBox::WriteText(const wxString& value)
|
void wxComboBox::WriteText(const wxString& value)
|
||||||
|
Reference in New Issue
Block a user