CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Posts
    91

    Tab order between panels

    Hi all,

    I have a form with multiple text boxes in different panels. What I need to do is be able to tab to a text box on a different panel.

    I already googled it, but there is not much help.

    Thanks.

  2. #2
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: Tab order between panels

    this should be no problem

    assume there are 2 panels on the form with both 2 textboxes

    panel1.TabIndex = 1
    panel2.TabIndex = 2

    textBox1.TabIndex = 1 (on panel 1)
    textBox2.TabIndex = 2 (on panel 1)
    textBox3.TabIndex = 1 (on panel 2)
    textBox4.TabIndex = 2 (on panel 2)


    when you press tab, it will go from textBox1 --> textBox2 --> textBox3 and finally textBox4

  3. #3
    Join Date
    Sep 2008
    Posts
    91

    Re: Tab order between panels

    dannystommen,

    Thank you for replying. What I was trying to do is tab as follows.

    textBox1.TabIndex = 1 (on panel 1)
    textBox3.TabIndex = 1 (on panel 2)
    textBox2.TabIndex = 2 (on panel 1)
    textBox4.TabIndex = 2 (on panel 2)

    As textBox1 on panel1 and textBox3 on panel2 were lined up one below the other. The same applied to the other two boxes....well, my textboxes.

    I moved all the text boxes to one panel and it's doing what I wanted to do.

    Thanks.

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

Featured