Lines do not show inside a group box

There have been several posts about controls, like an image well, not showing when displayed inside a group box. I haven’t found a resolution for this. I would like to put several line controls inside a group box to make things more readable, but the line does not show up. I made certain that the whole line is within the box. Is there a fix for this. Sure would like to use the line control.

If you reduced the line size to fit then that might not be enough. Drag it out of the GroupBox and drag it back in - there should be a red outline being shown when it is inside the GroupBox, showing that the IDE has recognized it as being in the GroupBox.

The group box outline is red, and the line is completely within the group box. All 8 drag squares are inside the group box. And at no time was any part of the line outside the box. I could drag it from the library to my app without leaving the group box. It still is not visible during execution.

This works fine for me on Windows 10 and macOS 11.3. What OS are you using? Is the GroupBox nested inside any other controls? Can you reproduce the issue in a new, blank project? Have you tried increasing the thickness to make sure it’s not some fluke of display scaling?

That’s it. My GroupBox is inside a PagePanel.

When the GroupBox is alone the line shows up. When the line is on a PagePanel without a GroupBox the line shows up. And when the line is alone without any GroupBox or PagePanel it shows up.

It’s just not visible when inside a GroupBox which is inside a PagePanel. Clicking the “move control forward” has no effect since there is nothing to move forward.

I can’t reproduce these results in a test project: LineTest.xojo_xml_project
(macOS 11.4; Xojo 2020r2.1)

Perhaps create a private ticket and share your project with Xojo?
You’re also welcome to privately message me the project if you’re comfortable.

1 Like

Try putting the Groupbox and contents inside a ContainerControl, and then onto the PagePanel.

Tim, Thank you for your effort. You made me check one more thing, and I may have the answer. When this window appears, I make two group boxes invisible, ie, visible = FALSE. Then the user selects one of two radio buttons. The first radio button makes the first group box visible while the second radio button makes the second group box visible. Everything in the group box becomes visible EXCEPT THE LINES. I’m still trying to figure out why the lines are lost and all the other controls in the group box remain.

I have been able to reproduce the issue with the help of OP: LineTest-broken.xojo_xml_project

A workaround for anyone stuck with this bug is that setting the Line.Parent property to nil makes the line visible.

Someone should file a ticket and attach this sample project.
Happy coding!

1 Like

I tested button, check box, radio button and those work. Maybe is only the lines that have the problem.

Edit: changed the code (for the workaround) to:

If CheckBox2.Value Then
  Line1.Parent = Nil
  Line1.Parent = GroupBox1

and it looks like that works.