Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 751
  • Last Modified:

Setting tab order in tab control

I have code which will allow my users to manipulate the tab order in a tab control.  I have no problem saving the order to a configuration file when the program exits, but can't seem to figure out how to change the order programmatically when the program starts.

Any ideas?
0
rmmarsh
Asked:
rmmarsh
  • 2
1 Solution
 
dericstoneCommented:
You need to set the TabIndex property of each control. The trick is, you will need to set the tab index in order beginning with the first control in the tab order, followed by the second item, etc.
0
 
rmmarshAuthor Commented:
I guess I didn't make myself clear... I need to set the index of the tab pages within the tab control, not the tab indexes.
0
 
Éric MoreauSenior .Net ConsultantCommented:
in order to change the tab order, you need to remove the pages and re-add them in the correct order. notice that the content of the tabpages won't be lost.

for an example, see http://www.emoreau.com/Entries/Articles/2004/05/The-incomplete-TabControl.aspx
0
 
rmmarshAuthor Commented:
Thank you...
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now