A simple solution would be to put enough space characters into the TGroupBox.Caption property. A more complicated solution would be to derive from TGroupBox and use FillRect/DrawParentBackground in the Paint method to over paint the line.
views:
181answers:
4In the past I have just added a blank TLabel behind the checkbox.
It makes maintenance a bit of a pain though
Doesn't the Color property on the TCheckbox do it?
In your picture above, I think you can get what you want if you set the Color to same as the color of the control. That will hide the lines under the text that is part of the control and make it blend in.
Since you won't know the color in advance (due to not knowing what theme is in use) you'll want to do it dynamically at run time when the form is created, e.g.:
Checkbox.Color := Control.Color;
thank you all for your answers. in the end, i did this:
padded the beginning of the groupbox caption programmatically with spaces to the correct width.
move the checkbox (without a caption) into the caption area.
it's not a perfect solution but it seems ok.