Use wxFILTER_EXCLUDE_CHAR_LIST in the sample.
It makes more sense than wxFILTER_EXCLUDE_LIST with SetCharExcludes(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7913d200c8
commit
6aa18bf7c4
@ -258,12 +258,12 @@ MyDialog::MyDialog( wxWindow *parent, const wxString& title,
|
||||
|
||||
|
||||
// Now set a wxTextValidator with an explicit list of characters NOT allowed:
|
||||
wxTextValidator textVal(wxFILTER_EMPTY|wxFILTER_EXCLUDE_LIST, &g_data.m_string2);
|
||||
wxTextValidator textVal(wxFILTER_EMPTY|wxFILTER_EXCLUDE_CHAR_LIST, &g_data.m_string2);
|
||||
textVal.SetCharExcludes("bcwyz");
|
||||
wxTextCtrl* txt2 =
|
||||
new wxTextCtrl(this, VALIDATE_TEXT2, wxEmptyString,
|
||||
wxDefaultPosition, wxDefaultSize, 0, textVal);
|
||||
txt2->SetToolTip("uses wxTextValidator with wxFILTER_EMPTY|wxFILTER_EXCLUDE_LIST (to exclude 'bcwyz')");
|
||||
txt2->SetToolTip("uses wxTextValidator with wxFILTER_EMPTY|wxFILTER_EXCLUDE_CHAR_LIST to exclude 'bcwyz'");
|
||||
flexgridsizer->Add(txt2, 1, wxGROW);
|
||||
|
||||
flexgridsizer->Add(new wxListBox((wxWindow*)this, VALIDATE_LIST,
|
||||
|
Loading…
Reference in New Issue
Block a user