Is this feature already built in? can I like supply a string of characters that aren't allowed?
Checked all the tutorials, didn't find anything...
Checked all the tutorials, didn't find anything...
Global glb_filterlist:String[] = ["~~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+", "{", "}", "|", "~q", ":", "<", ">", "?", "`", "[", "]", "", ";", "'", ",", "/", "="] '... Type MainFrame Extends MainFrameBase Field login_validator:wxTextValidator Method OnInit() Super.OnInit() login_validator = New wxTextValidator.Create(wxFILTER_EXCLUDE_LIST) login_validator.SetExcludes(glb_filterlist) login_validator.SetWindow(m_AccountName) 'etc....
' BlitzMax code generated with wxCodeGen v1.10 : 18 Aug 2008 16:45:19 ' ' ' PLEASE DO "NOT" EDIT THIS FILE!
SuperStrict Framework wx.wxApp Import wx.wxFrame Import wx.wxTextCtrl New MyApp.Run() Type MyApp Extends wxApp Method OnInit:Int() Local sim:Simple = Simple(New Simple.Create(Null, wxID_ANY, "Validator Test", -1, -1, 250, 150)) sim.Show(True) Return True End Method End Type Type Simple Extends wxFrame Field text:wxTextCtrl Field login_validator:wxTextValidator Method OnInit() text = New wxTextCtrl.Create(Self, -1) login_validator = New wxTextValidator.Create(wxFILTER_EXCLUDE_LIST) login_validator.SetExcludes(["a", "b"]) login_validator.SetWindow(text) Centre() End Method End Type
SuperStrict Framework wx.wxApp Import wx.wxFrame Import wx.wxTextCtrl New MyApp.Run() Type MyApp Extends wxApp Method OnInit:Int() Local sim:Simple = Simple(New Simple.Create(Null, wxID_ANY, "Validator Test", -1, -1, 250, 150)) sim.Show(True) Return True End Method End Type Type Simple Extends wxFrame Field text:wxTextCtrl Field login_validator:wxTextValidator Method OnInit() text = New wxTextCtrl.Create(Self, -1) login_validator = New wxTextValidator.Create(wxFILTER_EXCLUDE_CHAR_LIST) login_validator.SetExcludes(["a", "b"]) text.SetValidator(login_validator) Centre() End Method End Type
'Doesn't work Global glb_filterlist:String[] = ["~~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+", "{", "}", "|", "~q", ":", "<", ">", "?", "`", "[", "]", "", ";", "'", ",", "/", "=", " "] login_validator.SetExcludes(glb_filterlist) 'Works login_validator.SetExcludes(["~~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+", "{", "}", "|", "~q", ":", "<", ">", "?", "`", "[", "]", "", ";", "'", ",", "/", "=", " "])
Compiling:common.bmx Compile Error: Can't find interface for module 'wx.wxwindow' [D:/BlitzMax/mod/wx.mod/wxvalidator.mod/common.bmx;24;1] Build Error: failed to compile D:/BlitzMax/mod/wx.mod/wxvalidator.mod/common.bmx