Tab Control

liquidspaces

Regular
Joined
Nov 19, 2002
Messages
74
Location
Richmond, VA
Ok, so I avoided learning how to use Tab Controls for quite a while. Well, now I need the cursed things and I can't figure the little buggers out.

I have 4 tabs on the main form. Each is named properly, with a lovely bit of text on each one. My question is, how do I "link" a tab to the appropriate form? I've tried so many different events and conditions that my head is spinning.

I feel like there is something very small that I'm missing, because I can't find any information on this anywhere. Must be pretty self-explanitory (unless you're in the panic of learning a new language with a three day deadline to get the inventory system up).
 
Tabs don't link to forms. In the designer you can change the selected tab by clicking on it, just like you can at runtime. When a tab is showing, you can put controls on it, just like you'd put them on a form.
 
Can you help me understand how to use tabs then? Let's say I have two tabs. One is labeled "Shipping" and the other is labeled "Carrier". There is a shipping form that I need to come up when the user clicks "Shipping", and a carrier form that needs to come up when the user clicks "Carrier".

I can get it to work if I put both forms on one and set the visible properties appropriately. However, this causes problems with data validation.

Can you offer any advice?
 
I'd suggest you rethink how your UI is going to work. Tabs are not supposed to bring up forms, rather they are supposed to split one form in to meaningful categories.

If you want to bring up forms you could always do so when the user clicks on buttons or hyperlinks.
 
Ok, I understand. It is actually one form by design, but it's so big that I broke it down into separate forms. The tabs are rather necessary for this project, so I'll have to work on more suited layout.
Thanks,
Kevin
 
Back
Top