|
-
Mar 3rd, 2001, 02:47 AM
#1
Thread Starter
Hyperactive Member
How can I make the textboxes detect when they are filled up and then skip to the next text box... and I tend to place my boxes out of order due to rearranging stuff all of the time, how do I rearrange the order they go in when you hit tab..?
-
Mar 3rd, 2001, 02:49 AM
#2
Member
Each textbox has a TabStop property. Focus starts on TabStop 0, then goes to 1, etc...
-Patrick
Visual Basic 6 SP5
Master Programmer Wannabe
Check out the API-Guide for all your API needs!
--Soli Deo Gloria--
-
Mar 3rd, 2001, 06:25 AM
#3
_______
<?>
Work it backwards...go to your controls and set the tabIndex to 0 and keep setting each and every one to 0 till you reach the one that you want first. Now all your tabs will be in the order you want...tabbing from first to last.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Mar 3rd, 2001, 03:10 PM
#4
Thread Starter
Hyperactive Member
allright, thanks that worked fine, but what about the skip thing? Kind of like how Microsoft and other programs do with the cdkeys when you enter them... You enter the first few numbers, then when that box is filled, it skips to the next...
-
Mar 3rd, 2001, 03:44 PM
#5
the easiest way would be to use a control array...
Code:
Private Sub Text1_Change(Index As Integer)
On Error Resume Next 'needs to be here
If Len(Text1(Index).Text) = 5 Then '5 or what ever number
Text1(Index + 1).SetFocus
EndIf
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 3rd, 2001, 03:51 PM
#6
Thread Starter
Hyperactive Member
it says...
procedure declaration does not match description of event or procedure having the same name
???????
-
Mar 3rd, 2001, 03:53 PM
#7
do you have it set up as a control array?? ie - Text1(0), Text1(1), and so on??
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 3rd, 2001, 03:58 PM
#8
Thread Starter
Hyperactive Member
lol, do now, and it works.. but on the last one, i want them to be able to enter 4 digits... what should i do there? (btw, there are 3 boxes..)
-
Mar 3rd, 2001, 04:00 PM
#9
Code:
Private Sub Text1_Change(Index As Integer)
On Error Resume Next 'needs to be here
If Len(Text1(Index).Text) = Text1(Index).MaxLength Then
Text1(Index + 1).SetFocus
EndIf
End Sub
I think that will work...
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 3rd, 2001, 04:01 PM
#10
Thread Starter
Hyperactive Member
Thanks! You have been great help!
Last edited by Sacofjoea; Mar 3rd, 2001 at 04:08 PM.
That arranged can be
-
Mar 3rd, 2001, 04:07 PM
#11
for some reason my last post was edited instead of making a new post, just look up...
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|