return true;
}
-wxGenericValidator::~wxGenericValidator()
-{
-}
-
// Called to transfer data to the window
bool wxGenericValidator::TransferToWindow(void)
{
{
pControl->SetStringSelection(* m_pString);
}
- else
+ if ((m_validatorWindow->GetWindowStyle() & wxCB_READONLY) == 0)
{
pControl->SetValue(* m_pString);
}
}
} else
#endif
+#if wxUSE_STATTEXT
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
{
wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
return true;
}
} else
+#endif
#if wxUSE_TEXTCTRL
if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
{
}
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;
}
} else
}
} else
#endif
+#if wxUSE_STATTEXT
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
{
wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
return true;
}
} else
+#endif
#if wxUSE_TEXTCTRL
if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
{