SetValue fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-02-27 10:24:56 +00:00
parent 8258ba4fc1
commit 421ef4c99b
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