![]() |
TCheckBox zu schnal bei large fonts (150%)
Hallo #,
ich teste hier gerade mal large Fonts. Manche meiner CheckBoxen werdne bei 150% zu schnal angezeuigt. Leider hat TCheckBox ja kein AutoSize. Der Ansatz hier hilft nicht. ![]() Darauf aufbauend meine weiteren Bemühungen ...
Delphi-Quellcode:
Klappt aber nichtvar ACheckBox: TCheckBox iCxCheck := GetSystemMetrics(SM_CXMENUCHECK); dFactor := PixelsPerInch/96; if PixelsPerInch>96 then begin iCxCheck:= Round(iCxCheck*dFactor); end; ACheckBox := TCheckBox(Component); if PixelsPerInch=96 then begin iCheckBoxWidth := iCxCheck+4+Self.Canvas.TextWidth(ACheckBox.Caption); end else begin iCheckBoxWidth := iCxCheck+Round(4*dFactor)+Self.Canvas.TextWidth(ACheckBox.Caption); end; if iCheckBoxWidth>ACheckBox.Width then begin ACheckBox.Width := iCheckBoxWidth; end; #Update:# Das iCxCheck war immer noch zu klein, jetzt klappt es *freu* Heiko |
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:42 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz