Fixed bug in setting/getting value for wxComboBox. Read-only status

is taken into account.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2004-11-01 15:58:56 +00:00
parent 23fba6860a
commit 780fb83cb0

View File

@ -225,7 +225,7 @@ bool wxGenericValidator::TransferToWindow(void)
{ {
pControl->SetStringSelection(* m_pString); pControl->SetStringSelection(* m_pString);
} }
else if ((m_validatorWindow->GetWindowStyle() & wxCB_READONLY) == 0)
{ {
pControl->SetValue(* m_pString); pControl->SetValue(* m_pString);
} }
@ -450,7 +450,10 @@ bool wxGenericValidator::TransferFromWindow(void)
} }
else if (m_pString) else if (m_pString)
{ {
*m_pString = pControl->GetValue(); if (m_validatorWindow->GetWindowStyle() & wxCB_READONLY)
*m_pString = pControl->GetStringSelection();
else
*m_pString = pControl->GetValue();
return true; return true;
} }
} else } else