tags:

views:

43

answers:

1

I have two separate areas in my form. Left side for radio buttons, combo boxes, etc. Right side for tabs and even tabs within tabs.

For each tab selected, I'd like to display different controls on the left side for use in that tab. I've tried using many things, including focus, click, etc. Nothing seems to work the way I intend it to. Especially on the tabs within the tabs.

An image of the UI is located at: http://img43.imageshack.us/img43/7533/scrnshotg.jpg

A: 

Whenever I use tabs and require other controls to change state (visible, enabled, etc.), I have used the tabcontrol's selected tab index in combination with a collection of sorts. It's been a while, but if I remember correctly I had tabs on a top portion that when I selected, would change the multiline textbox input source.

// this will give you a key to associate with a tab index    
Dictionary <int, Panel> subPanels = new Dictionary <int, Panel> ();  

Then just grab the index of the page you selected:

int panelIndex;

/* pseudo
OnTabClicked (sender, info)
{
   subPanels[panelIndex].Visible = false;
   panelIndex = info.Index;
   subPanels[panelIndex]Visible = true;
}
*/

I'm pretty confident something like this would work for you. It may take some tweaking for your exact use, but it should get you going the right direction.

dboarman