SetValue can add values if not readonly

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-02-27 10:06:12 +00:00
parent 62b4ae0811
commit d60de5167e
2 changed files with 12 additions and 2 deletions

View File

@@ -311,7 +311,12 @@ wxString wxComboBox::GetValue() const
void wxComboBox::SetValue(const wxString& value)
{
SetStringSelection( value ) ;
int s = FindString (value);
if (s == wxNOT_FOUND && !HasFlag(wxCB_READONLY) )
{
m_choice->Append(value) ;
}
SetStringSelection( value ) ;
}
// Clipboard operations

View File

@@ -311,7 +311,12 @@ wxString wxComboBox::GetValue() const
void wxComboBox::SetValue(const wxString& value)
{
SetStringSelection( value ) ;
int s = FindString (value);
if (s == wxNOT_FOUND && !HasFlag(wxCB_READONLY) )
{
m_choice->Append(value) ;
}
SetStringSelection( value ) ;
}
// Clipboard operations