diff --git a/components/exctrls/source/exbuttons.pas b/components/exctrls/source/exbuttons.pas index f1fdadc75..916deec8e 100644 --- a/components/exctrls/source/exbuttons.pas +++ b/components/exctrls/source/exbuttons.pas @@ -528,6 +528,8 @@ begin txtPt.Y := (Height - txtSize.CY + 1) div 2; R := Rect(txtPt.X, txtPt.Y, txtPt.X + txtSize.CX, txtPt.Y + txtSize.CY); + // Do not draw the text with DrawText(...) because it requires SingleLine=true + // for vertical centering. ts := lCanvas.TextStyle; ts.Alignment := lAlignment; ts.Layout := tlCenter;