|
-
Mar 19th, 2004, 12:51 PM
#1
Thread Starter
PowerPoster
Tabbing through controls
Hi,
Is there a method to tab to the next control on a form in tabindex order i.e. set the focus to the next control without specifying it by name?
Last edited by taxes; Mar 19th, 2004 at 09:19 PM.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Mar 19th, 2004, 12:54 PM
#2
Frenzied Member
Something like SendKeys.Send({TAB})?
There's probably a better way.
You could iterate through the controls, see which one has the focus, then set the focus to the control with the next tabindex, but that sounds like more work.
Last edited by salvelinus; Mar 19th, 2004 at 03:21 PM.
-
Mar 19th, 2004, 03:59 PM
#3
Thread Starter
PowerPoster
Hi Salvelinus,
Many thanks, You have put me on the right track, I can include the tabindex number in the parameters forwarded by the last accessed control!!!
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Mar 19th, 2004, 09:35 PM
#4
Thread Starter
PowerPoster
Hi,
I am using a form derived from a base form. The Derived form has extra controls. Although I can record the tab index of the control currently in focus, when I try to set focus on the next tabindex number I can't. I get an error message to the effect that the tabindex number I require is "Out of Range" When I look further into this, I find that the programme is taking into account the number of controls on the Base form, not the derived one.
Another wierd thing is that when I try to reference the control in the Instance name (the form was instanced in another form) I cannot rebuild the project as I am told the Instance name has not been declared. I can only get round this by creating the instance in the general section of the Module (not any of the forms, even if declared Public.)
Anyone any comments?
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
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
|