Results 1 to 2 of 2

Thread: Tab Index of form controls not working as expected

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2020
    Location
    Brisbane, Oz
    Posts
    10

    Post Tab Index of form controls not working as expected

    I'm blaming this on Trump

    Have a form that I have added a bunch of labels, text boxes, and combo boxes to.

    Working fine, happy with life, then my Trump election moment!!!!

    Added an additional combo box which I want to be tab indexed as 3.

    Went to the View->Tab Order option and manually clicked through the order I want things to be addressed 0, 1, 2 ,3 etc.

    My new combo box however is still getting accessed as the last control on the form rather than the fourth one

    Am I not doing something.

    Please note this is a project that has been dropped in my lap, original coder has resigned and headed further north, and I haven't touched this stuff since the VB6 days.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Tab Index of form controls not working as expected

    Are some of your controls inside containers, because that affects the Tab order, e.g. a TextBox with a TabIndex of 2 inside a Panel with a TabIndex of 0 will be visited before a TextBox on the form with a TabIndex of 1. Can you take a screenshot of your form with all TabIndexes showing?

    Also, keep in mind that the Tab order relates ONLY to the order in which controls receive focus when pressing the Tab key (or when calling SelectNextControl). If you're talking about the order they are accessed from the Controls collection of their parent then that is related to the z-order, not the Tab order. You can see and change the z-order in the Document Outline tool window.

Tags for this Thread

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