Tab Control With A Set Of Controls.
I started with a form .. and on it a number of controls, sliders… text boxes, etc.
These controls are set up when the form is constructed from an existing object.
Before the form is closed – the values of the controls are read back from the calling application and the object is updated – Pretty standard stuff.
Let’s call all these values the ‘settings’ of the object
I now need to have this form show 4 different sets of settings – one each on a tab page.
The controls themselves are not all displayed – panels are used to show some controls and hide others – all depending on one of the settings.
For example if the form was to show and set temperature , then only the controls used for this are displayed…
If the form was to show humidity- then a different set of controls would be shown.
Each TAB PAGE must behave in EXACTLY the same way .. with controls and panels – IDENTICAL, but each page would represent a different object, and the fields must be accessed in a structured way .. like..
Tabpage1.Temperature = xxx
Tabpage2.Temperature = yyy
Ideally .. an indexer would be usedlike
Tabpage[1].Temperature = xxx
Tabpage[2].Temperature = yyy
Tabepage[1].PanelA.visible = false;
Tabpage[3].Slider1.Value = zzz
and for setting up each Tab page:- e.g.
If (Tabpage[1].Type == TemperatureType)
{
Tabpage[1].Temperaturepanel.Visible = true;
}


