Recent

Author Topic: TBitBtn and TImageList  (Read 641 times)

LeoBruno

  • Jr. Member
  • **
  • Posts: 61
TBitBtn and TImageList
« on: July 27, 2022, 11:25:32 pm »
Hi:

Lcl controls seems to do not consider that some of Us don't like to put text into iconed buttons.

The glyph position property (layout) only have options to draw the image on the four corners.

At design time, the buttons are sized and positioned fine, but it gets ugly an runtime (see attached scrennshots).

How can I fix this?

1 - keep the size of the icons
2 - Keep the icons centered

Thank's



Lazarus 2.2.2 FPC 3.2.2 Windows (qt5) Anchor Docking

wp

  • Hero Member
  • *****
  • Posts: 11910
Re: TBitBtn and TImageList
« Reply #1 on: July 27, 2022, 11:59:33 pm »
On a caption-less TBitBtn, the glyph is centered horizontally when its Spacing property is set to 0, and its Margin property is set to -1. Spacing is the distance between the text and the glyph, and Margin is the distance between the border and the text, -1 means: "center the combination of text and image".

LeoBruno

  • Jr. Member
  • **
  • Posts: 61
Re: TBitBtn and TImageList
« Reply #2 on: July 28, 2022, 02:27:54 pm »
Thank you
Lazarus 2.2.2 FPC 3.2.2 Windows (qt5) Anchor Docking

 

TinyPortal © 2005-2018