TSpeedButton autosize with margin
Original Reporter info from Mantis: zaher
-
Reporter name: Zaher Dirkey
Original Reporter info from Mantis: zaher
- Reporter name: Zaher Dirkey
Description:
Put SpeedButton1 on the form, use
SpeedButton1.Caption := 'Speed Button';
SpeedButton1.AutoSize := True;
SpeedButton1.Margin := 5;
TSpeedButton calculate the size correctly in MeasureDraw but when painting it, it shifted by PaintBackground(PaintRect) (line about 855 in speedbutton.inc), because PaintBackground change Left (and Right) or PaintRect, when painting by theme, come from windows theme uxTheme.dll
to resolve it
procedure PaintBackground(var PaintRect: TRect); virtual;
to
procedure PaintBackground(PaintRect: TRect); virtual;
but idk how that will effects on other thing, it is need the maintainer to fix it.
Mantis conversion info:
- Mantis ID: 38865
- OS: Windows 8.1 64 bit
- OS Build: 8.1
- Build: 65095
- Platform: Windows
- Monitored by: » zaher (Zaher Dirkey), » nouzi (nouzi)