Group Box Controls Overlap

R

Richard Myers

Hello,

When inserting a label into a group box, if the label exceeds the width
dimensions of the group box,
the group box lines (or a portion thereof) disappear. In a panel i just
<send to back>.
This doesn't seem to work to for a group box.

How can i ensure the border lines of group box are always displays,
regardless of the size of any of its child controls?
Do i have pop them into a panel and stick that into the group box? (seems a
bit redundant)
Note i dont want to alter the size of the child controls, i just want them
to disappear under the group box border if they
would, for any reason, overlap.

Thanks
Richard
 
H

Herfried K. Wagner [MVP]

Richard Myers said:
When inserting a label into a group box, if the label exceeds the width
dimensions of the group box,
the group box lines (or a portion thereof) disappear. In a panel i just
<send to back>.
This doesn't seem to work to for a group box.

How can i ensure the border lines of group box are always displays,
regardless of the size of any of its child controls?
Do i have pop them into a panel and stick that into the group box? (seems
a
bit redundant)

AFAIK that's the cleanest way. Add a panel with 'Dock' set to 'Fill' to the
groupbox and then place the controls in the panel.
 
H

Hal Rosser

Richard Myers said:
Hello,

When inserting a label into a group box, if the label exceeds the width
dimensions of the group box,
the group box lines (or a portion thereof) disappear. In a panel i just
<send to back>.
This doesn't seem to work to for a group box.

How can i ensure the border lines of group box are always displays,
regardless of the size of any of its child controls?
Do i have pop them into a panel and stick that into the group box? (seems a
bit redundant)
Note i dont want to alter the size of the child controls, i just want them
to disappear under the group box border if they
would, for any reason, overlap.

its like putting a gallon of water into a quart jug.
You can check in code if the ( x-position plus width) of the group box is
less than that of the control,
if so, then you may want to adjust the width of the control programatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top