[Gambas-user] SetFocus to next MaskBox in a Group

John Rose john.aaron.rose at ...626...
Thu Feb 12 13:54:06 CET 2015


I have a set of MaskBoxes (each with Group Cyphered & with MaxLength of
1) with Names of CypheredMaskBox1, CypheredMaskBox2, CypheredMaskBox3
etc. CypheredMaskBox1 has Tag of 1, CypheredMaskBox2 has Tag of 2 etc.
In my Cyphered_Change event, I do validation of a user-entered character
but want to SetFocus to the next (i.e. with Tag of 1 greater than
current Tag) in case of successful validation. How do I do this (ideally
by extending the code fragment below)?

Code fragment:
Dim iNextTag As Integer
Dim strNextTag As String
Dim strNextCyphered As String
iNextTag = CInt(Last.Tag) + 1
strNextTag = CStr(iNextTag)
strNextCyphered = "CypheredMaskBox" & strNextTag


-- 

John






More information about the User mailing list