'Caption position in a TSpeedButton

I'm using C++Builder 11 Alexandria. Is there a way to position a SpeedButton caption always centered even if there is a glyph? Caption can be positioned at right, at left, at top or at bottom of the glyph, but I need to position it over the glyph. I use SpeedButton because using glyph I can distinguish pressed and unpressed state so I can't use, for example, a TImage and use it's OnClick event to simulate a button.

Also to write text in the SpeedButton would be a solution but the SpeedButton Canvas property is protected so I can't use DrawText and in the SpeedButton there is no OnDraw event.

Any suggestion is appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source