I have a couple of Labels and Text Editors and a pair of radio buttons I want to appear and disappear as a group. So I create them all in a Group Box in the Jucer. The code the Jucer generates creates the elements and adds them to the top level component. So, in the constructor I addAndSetVisible() all the elements to the GroupComponent.
The elements are properly added to the GroupComponent’s child list. But the x & y positions are still relative to the top level component they were originally added to. So, when the parent’s internalRepaint() does the vertical clipping check, it finds that (the original) y + h is > the height of the parent. So, a new h is calculated as the parent height - (the original) y, invariably ending up with a negative number for all the elements. So nothing gets repainted.
What am I doing wrong? How can I accomplish this common action in JUCE?
TIA for any help.