![]() |
TButton align to left
How i make to align to left a text in the Button component?
Idont find solution for this, anybody can helpme? |
Re: TButton align to left
Moin mr_fahrrad,
du musst dir eine eigene Komponente vom Typ TButton ableiten und die Eigenschaft Align selbst hinzufügen. Welche Delphi-Version hast du ? Gruß |
Re: TButton align to left
Maybe TSpeedButton or TBitButton have a text-align property...
If you have to draw the text yourself (e.g. following MrKnogge's suggestion), you might want to draw the text yourself: ![]() On the other Hand, you should be able to tell the WinAPI to align the text... but I don't know how. |
Re: TButton align to left
Hi Lukas,
Zitat:
Delphi-Quellcode:
Regards
procedure TDemoForm.ButtonClick(Sender: TObject);
var dwStyle: LongWord; begin with Sender as TButton do begin dwStyle := GetWindowLong(Handle, GWL_STYLE); dwStyle := dwStyle and not BS_CENTER or BS_LEFT; SetWindowLong(Handle, GWL_STYLE, dwStyle); Invalidate; end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:10 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-2025 by Thomas Breitkreuz