Implement wxComboBox::SetValue() in wxQt
Make setting combobox value work.
This commit is contained in:
committed by
Vadim Zeitlin
parent
019cf6e6f0
commit
fd7f4dfe3d
@@ -69,6 +69,8 @@ public:
|
|||||||
bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
|
bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
|
||||||
bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
|
bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
|
||||||
|
|
||||||
|
virtual void SetValue(const wxString& value) wxOVERRIDE;
|
||||||
|
|
||||||
virtual void Popup();
|
virtual void Popup();
|
||||||
virtual void Dismiss();
|
virtual void Dismiss();
|
||||||
|
|
||||||
|
@@ -118,6 +118,14 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return QtCreateControl( parent, id, pos, size, style, validator, name );
|
return QtCreateControl( parent, id, pos, size, style, validator, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxComboBox::SetValue(const wxString& value)
|
||||||
|
{
|
||||||
|
if ( HasFlag(wxCB_READONLY) )
|
||||||
|
SetStringSelection(value);
|
||||||
|
else
|
||||||
|
wxTextEntry::SetValue(value);
|
||||||
|
}
|
||||||
|
|
||||||
wxString wxComboBox::DoGetValue() const
|
wxString wxComboBox::DoGetValue() const
|
||||||
{
|
{
|
||||||
return wxQtConvertString( m_qtComboBox->currentText() );
|
return wxQtConvertString( m_qtComboBox->currentText() );
|
||||||
|
Reference in New Issue
Block a user