From 838a687d941cff7ac86fba62354177ac35464da2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 25 Nov 2017 10:38:40 +0100 Subject: [PATCH] Document wxComboBox::SetValue() better in wxCB_READONLY case Make it clear that the control doesn't send wxEVT_TEXT event in this case. --- interface/wx/combobox.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/interface/wx/combobox.h b/interface/wx/combobox.h index b2bf2579f3..5447243a4d 100644 --- a/interface/wx/combobox.h +++ b/interface/wx/combobox.h @@ -253,12 +253,15 @@ public: /** Sets the text for the combobox text field. - Notice that this method will generate a @c wxEVT_TEXT - event, use wxTextEntry::ChangeValue() if this is undesirable. + For normal, editable comboboxes with a text entry field calling this + method will generate a @c wxEVT_TEXT event, consistently with + wxTextEntry::SetValue() behaviour, use wxTextEntry::ChangeValue() if + this is undesirable. - @note For a combobox with @c wxCB_READONLY style the string must be in - the combobox choices list, otherwise the call to SetValue() is - ignored. This is case insensitive. + For controls with @c wxCB_READONLY style the method behaves somewhat + differently: the string must be in the combobox choices list (the check + for this is case-insensitive) and @c wxEVT_TEXT is @e not generated in + this case. @param text The text to set.