Autor Beitrag
No0B
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62



BeitragVerfasst: Do 08.04.10 21:22 
Mein Problem ist wahrscheinlich einfach zu lösen nur leider komme ich nicht drauf.

Habe ein Label:
ausblenden Delphi-Quelltext
1:
2:
label1.Caption :=
 'Text1'#13#10'Text2';

wenn ich das Programm starte kommt immer die Caption die in Eigenschaften eingetragen ist "Label" und nicht meine die ich im Code eingetragen habe. Warum, wo ist das Problem.

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
Moderiert von user profile iconNarses: Topic aus Multimedia / Grafik verschoben am Do 08.04.2010 um 22:37
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Do 08.04.10 21:30 
weil du den code nicht aufruft? Du musst die Zeile ja auch ausführen. ;)

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
No0B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62



BeitragVerfasst: Do 08.04.10 21:32 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Label1show(Sender: TObject);
begin
 label1.Caption :=
'Text1'#13#10'Text2'
 end;

das meinst du ? habe ich drin.

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Do 08.04.10 21:34 
Label1 hat keine Methode OnShow (zumindest im D7). Ich nehme an das hast du selbst reingeschrieben und nicht über den Objektinspektor erstellt (wär auch gar ned möglich). Je nach dem was du tun willst musst du den Code an einer anderen Stelle platzieren oder diese Methode aufrufen.

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
No0B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62



BeitragVerfasst: Do 08.04.10 21:48 
Beim Buttonclick soll form 2 geöffnet werden und nur der Text angezeigt werden.
Wenn ichs über die Toolpalette erstelle TLabel kommt mein text nur beim anklicken.
ausblenden Delphi-Quelltext
1:
procedure TForm1.Label1Click(Sender: TObject);					


Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Do 08.04.10 21:51 
Dann schreib das

ausblenden Delphi-Quelltext
1:
Label1.Caption := 'Text1'#13#10'Text2';					


ins TForm2.FormShow(Sender: TObject);.

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
No0B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62



BeitragVerfasst: Fr 09.04.10 20:12 
Ja so gehts.