Results 1 to 4 of 4

Thread: Tabbing through controls

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    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.

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    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.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    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.

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    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
  •  



Click Here to Expand Forum to Full Width