Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Centering a checkbox without a caption inside a TGridPanel

Tags:

delphi

vcl

Searched all over Google and I'm afraid I can't find an answer to this.

Here is my current situation:
Before

Instead of having those checkbox aligned to the left I want them centered like so (photoshopped obviously):
enter image description here

Anybody know how to achieve this with VCL? Thanks.

Edit: These components are inside a TGridPanel and for whatever reason the Left and Top properties have no effect on the position of the component in the cell. I have also looked for any layout properties with no luck.

like image 346
mc_honan Avatar asked Jan 28 '26 15:01

mc_honan


1 Answers

The controls inside the TGridPanel are automatically center-aligned. If you reduce the width of the checkboxes to the correct value it should be centered as requested. Be aware that if you reduce the size too much the checkbox will shrink.

like image 92
Uwe Raabe Avatar answered Jan 30 '26 11:01

Uwe Raabe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!