![]() |
TFont mit default-Wert beschreiben
Hallo,
ich hab eine Komponente mit einer Property abgeleitet von TFont. Jetzt möcht ich gerne dieser Property einen Default-Font-Wert geben. Wie mach ich das am besten? ich hab folgendes:
Delphi-Quellcode:
Nur kann ich im OnCreate reinschreiben was ich will, im OI wird immer ein (wahrscheinlich) Systemwert angezeigt!
property BalloonTipTitleFont: TFont read FBalloonTipTitleFont
write SetBalloonTipTitleFont; {...} procedure OnCreate(Sender: TObject); //Font für Titel erzeugen FBalloonTipTitleFont := TFont.Create; with FBalloonTipTitleFont do begin Charset := DEFAULT_CHARSET; Color := clBlack; Name := 'MS Sans Serif'; Size := 9; Style := [fsBold]; OnChange := OnTitleFontChange; end; |
Re: TFont mit default-Wert beschreiben
Die Initialisierung muss im Konstruktor deiner Komponente erfolgen.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:09 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