Code: Select all
textLabel1.AddChildComponent( textLabel2 );
Code: Select all
textLabel1.AddChildComponent( textLabel2 );
Yes, now I got it, thank you! But it also seems that the child component needs to be inside the parent's bounding rectangle, the rest is cut off. No problem, I just thought that the parent-child-relationship would simply mean locking the components' coordinates to each other, no matter what their initial placement is (like the "Link selected controls" option), that's what threw me off.Cherry Garcia wrote: ↑Mon Feb 22, 2021 2:20 am Set the position relative to the parent. That should help.
Yeah, indeed it looks like the parent component is treated like a container. What confused is me that you can add children to all GUI elements (text labels, buttons, etc), which don't "feel" like containers the same way a canvas does, for example.rsover wrote: ↑Sun Feb 21, 2021 8:19 pm I think the parent component should be a container component. https://docs.oracle.com/javase/tutorial ... index.html