TButton with images spacing between the image and caption... |
|
Have just moved to XE7 from Delphi 5. Started going through each component looking at the different properties. I am playing around with the Images property. I am trying to figure out how to define the spacing between the image that is displayed and the caption on the button.
For instance, I set the image alignment to iaLeft and the imageMargin to 10. Well after the image I would like to leave 20 pixels between the image and the caption. How would I go about doing this?
Thanks,
Zero.
|
Re: TButton with images spacing between the image and captio |
|
James Foreman wrote:
> Have just moved to XE7 from Delphi 5. Started going through each
> component looking at the different properties. I am playing around
> with the Images property. I am trying to figure out how to define
> the spacing between the image that is displayed and the caption on
> the button.
>
> For instance, I set the image alignment to iaLeft and the imageMargin
> to 10. Well after the image I would like to leave 20 pixels between
> the image and the caption. How would I go about doing this?
Imagemargins is a record property, you set imagemargins.left to define
the spacing between image and left button border, and
imagemargins.right to define the spacing between the image and the
button's text area. The problem is that the button draws the caption
horizontally centered in the text area, as far as I know (at least for
vcl's TButton), so the position of the caption left edge depends on the
text width.
--
Peter Below (TeamB)
|