GroupBox change is not performed by its child controls?

Hi there.

I have a window setup where a window may contain different container controls and each containter control includes a page panel to provide an assistant like setup.

This works well but now I need to expand this and I have a little problem (of course I can make a work around but I want to know if I miss something):
The TabPanel help page states that a TabPanel is not supported on top of a PagePanel. Therefore I cannot use it because I don’t want to run into “issues”…

So I decided to use a RadioButton set and switch GroupBoxes to change the controls.
Unfortunalety this does not work as expected because the child controls in the group box do not follow their parent:
• when I make the GroupBox invisible the controls are still visible.
• when I move the GroupBox out of the visible window part the controls are not moved.

So my question: Do I miss something or is this behavior a feature and each sub-control has to be handled manually, too?



If the radio buttons are not respecting the group box, make sure that they are truly a child of the group box…

Make sure the group box is behind the radio buttons
Select a radio button, does the group box get a big red frame? If not, then the radio button is not a child
Make sure the radio buttons are completely enclosed in the group box
Select a radio button, move it a little to see if it resets in the group box

The RadioButtons are not on the GroubBoxes. They should switch them.
The Child/Parent setup is right. So when I move the GroupBox in the IDE all controls are also moved.

My question is just whether a Parent change should be inherited to its childs or not.
This means i.e. visibility or location change (move the control out of view and back).

It seems that you are expecting a group box to behave like a container control and it doesn’t. Place your groupBox and radioButtons on a separate container control which you can hide/show, and move as you wish. I have had not difficulties layering container controls and hiding/showing them as needed.

This is no longer the case. The docs need to be updated.

Thanks for your help Tim and Roger. Now I can make a better design in my App.

CONTAINER CONTROL I am having trouble adding a Container Control to a Form. Gives the Circle with Line - cannot add.
I had the same problem as Thomas with the GroupBox but only if I copied a number of controls and Pasted them into the GroupBox. In this case GroupBox.visible just hides or shows the box - the control always stay visible.
However, if I create a Groupbox then add controls to the groupbox one by one, then the groupbox.visible shows or hides itself and all the controls whcih is what I was expecting. I think there is an ambiguous function in the groupbox as it works under some circumstances but not others

The groupbox must be the parent of the controls. You may need to move the controls slightly in order for the parent to be set. One pixel back and forth usually does the trick.

Interesting trick - will try thanks !