![]() |
Font in TEdit ändern
Hi,
ich habe versucht ein schon vorhandenes Thema zu suchen welches diese Frage beantwortet aber ich konnte eines nicht finden... :( Meine Frage lautet: Wie ändere ich (im Quellentext) den Font eines TEdit? :roll: Ich möchte auf OnClick den Font des TEdit fett (bold) machen. |
Re: Font in TEdit ändern
Delphi-Quellcode:
Mal so aus dem Kopf.
Edit1.Font.FontStyle := [fsBold];
|
Re: Font in TEdit ändern
Hallo,
das ist einfach:
Delphi-Quellcode:
bzw.
Edit1.Font.Style := [fsBold];
Delphi-Quellcode:
wenn Du die bisherige Formatierung beibehalten willst.
Edit1.Font.Style := Edit1.Font.Style + [fsBold];
Gruß xaromz |
Re: Font in TEdit ändern
Und wie mache ich dann das fett wieder zu normal?
|
Re: Font in TEdit ändern
Zitat:
Delphi-Quellcode:
oder
Edit1.Font.Style := [];
Delphi-Quellcode:
Edit1.Font.Style := Edit1.Font.Style - [fsBold];
|
Re: Font in TEdit ändern
nie mit "+" oder "-" bei sowas arbeiten. Denn wenn die Schrift schon fett ist und man nochmal "Fett" addiert kommt was ganz anderes raus.
|
Re: Font in TEdit ändern
Hallo,
Zitat:
Gruß xaromz |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:00 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