Results 1 to 8 of 8

Thread: I give up. How does one control the sequence that the [TAB] key between controls ?

  1. #1

    Thread Starter
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Post

    How does one control the sequence in which the [TAB] key moves from control to control?
    I have a form with three text boxes, six option buttons, and two command buttons. I want the [TAB] key to go Text1, Text2, Option Buttons (in a frame), Text3, Command1, Command2.
    Please help.
    Thanks,
    Al.

    ps. Is it just me or is the time on this BB an hour off?


    ------------------
    A computer is a tool, not a toy.
    <A HREF="mailto:[email protected]
    [email protected]">[email protected]
    [email protected]</A>


  2. #2
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722

    Post

    You set it with the TabIndex property, starting at 0 (of course)

    ------------------
    r0ach(tm)

  3. #3
    Lively Member
    Join Date
    Oct 1999
    Posts
    67

    Post

    to met his board is way off
    But then I live in England

  4. #4
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722

    Post

    Code:
    Text1.TabIndex = 0
    Text2.TabIndex = 1
      .
      .
      .
    Option6.TabIndex = 7
    Text3.TabIndex = 8
    'etc
    ------------------
    r0ach(tm)

  5. #5

    Thread Starter
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Post

    Hey rOach,
    Thanks. I should have known it was that simple.
    I'm new to forms and only six months into VB. All my programs for the past six months have been formless.
    Thanks again,
    Al.


    ------------------
    A computer is a tool, not a toy.
    <A HREF="mailto:[email protected]
    [email protected]">[email protected]
    [email protected]</A>


  6. #6
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722

    Post

    No problem

    ------------------
    r0ach(tm)

  7. #7
    Hyperactive Member Juan Carlos Rey's Avatar
    Join Date
    Aug 1999
    Location
    Mendoza, Argentina
    Posts
    301

    Post

    r0ach way is to set Tab Index Property at run time.
    To set it at design time you can clik on the last control you want to stop, press F4 and set Tab property to 0.
    Then proceed back way to the first control, setting always Tab property to 0. This sounds weird but is the recommended procedure. VB always rearrange the Tab property so when you reach the first control, all ar set OK.
    As for the time: I copied/pasted this from VB-World page:
    "All times are ET (US). All dates are in Month-Day-Year format."

    [This message has been edited by Juan Carlos Rey (edited 01-15-2000).]

  8. #8
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722

    Post

    I didn't put those as code, but as a way to show the order in which the controls' TabIndex properties should be set to have them in the required sequence. Maybe i shouldn't have put it in those code bracket thingies, hey?!

    ------------------
    r0ach(tm)

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