Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Control Design Issue With Data Common to Some of the Pages

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
I have a form with a Tab Control with several Tab Pages. The first page has a grid of summary records on it. The user may select any of the other pages that contain detail information of the selected record in the grid. These other detail pages all have some data common to the record displayed at the top of each page. This data is something like Order ID, Order Date, Ship Date, etc. The controls for this data are repeated on each detail page. Is there a way to have only one set of controls for these detail pages without changing the entire design? I have thought about putting them in a panel on the form and positioning it so it appears to be at the top of each page and setting the visible property to false when the first page is displayed. I really don't want to separate these into two different forms.

Auguy
Sylvania/Toledo Ohio
 
Can you have your Order ID, Order Date, Ship Date, etc displayed above the Tab control? So no matter what Tab you choose, you have this info visible, and in one place only (in a panel / group box?). And don't even display it on the first page in your Tab. This way your Tab should be smaller than it is now.

Have fun.

---- Andy
 
Thanks. Yes, I've thought about that. Might end up going that way if I don't come up with something better. I've also thought about putting them along the right side of the form and adjusting the size of the Tab Control to either cover them up or expose them.

Auguy
Sylvania/Toledo Ohio
 
If that would be me (as a User) looking at data organized like that (the same info on multiple Tabs), I would tend to look for differences between the info on different Tabs. And since there are none, why display them in more than one ‘location’ and confuse the (poor) User?

You may want to check with your Users what would they prefer.

Just my opinion... :)

Have fun.

---- Andy
 
I'm going to try a trick I saw a few days ago to move controls between pages. I just tried this with one control and it worked great. I put a textbox (txtTestMove) on one of the pages and then in the TabControl1_SelectedIndexChanged I put the following code
Code:
txtTestMove.Parent = TabControl1.TabPages(TabControl1.SelectedIndex)
Each time I clicked on one of the pages the textbox moved to the selected page. I will expand this to use a movable group box with my common controls inside it and see if the group box moves as nicely as the single control. Looks like it might work!

Auguy
Sylvania/Toledo Ohio
 
I just tried it with the group box I already had on the form that contains the common data controls. It moved perfectly! I will do some more testing, but it looks good so far. This should eliminate my duplicate controls on the Tab Pages.

Auguy
Sylvania/Toledo Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top