![]() |
Caption nicht vorhanden.
Hi,
Ich wollte nun genau das gleiche wie hir machen: ![]() Aber leider klappt das irgendwie wieder nicht ganz. Ich möchte das dass Object eine andere Caption kriegt. Doch irgendwie ist der Befehl nicht vorhanden? Was kann ich machen oder kennt jemand einen anderen Befehl?
Delphi-Quellcode:
Mfg
procedure ObjectCaption(Obj: TWinControl;Cap: String);
begin Obj.Caption := Cap; end; |
Re: Caption nicht vorhanden.
Wenn Obj z.B. ein Button ist musst du
Delphi-Quellcode:
schreiben
TButton(Obj).Caption := Cap;
|
Re: Caption nicht vorhanden.
Hi,
man könnt es höchstens so machen:
Delphi-Quellcode:
Bringt aber nicht wirklich einen Vorteil. Da kann man genausogut einfach Label1.Caption := schreiben.
procedure ObjCpt(Obj: TObject; const aCaption: String);
begin if Obj is TButton then TButton(Obj).Caption := aCaption; if Obj is TLabel then TLabel(Obj).Caption := aCaption; if Obj is TEdit then TEdit(Obj).Text := aCaption; end; |
Re: Caption nicht vorhanden.
Hi,
Ahh. Okay. Danke Mfg |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:17 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