Autor Beitrag
Silvia
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67



BeitragVerfasst: Fr 18.02.05 12:49 
Hi,

wie greift man auf die Werte eines zweiten Fomular zu?

Ich habe ein Hauptformular von dem ich ein zweites aufrufe und auf deren Werte die da eingegeben werden ich zugreifen will!
wie mache ich das?
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 18.02.05 12:54 
Angenommen du bist in Form1 und willst Daten von Form2 haben:
ausblenden Delphi-Quelltext
1:
TextVariable := Form2.Edit1.Text;					
IngoD7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 629


D7
BeitragVerfasst: Fr 18.02.05 12:58 
z.B. innerhalb deiner Form1 dann so:
ausblenden Delphi-Quelltext
1:
Label1.Caption:=Form2.Edit1.Text;					


Zeigt die Eingabe in Edit1 auf Form2 im Label1 auf Form1 an.


//EDIT:
Ach, bin ich wieder spät. So ist das, wenn das Telefon zwischendurch klingelt. Trotzdem komisch - zwei fast identische Antworten. :)


Zuletzt bearbeitet von IngoD7 am Fr 18.02.05 13:02, insgesamt 1-mal bearbeitet
BeniSchindler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 82

Win 2k / suse9.1
D7 Prof / Kylix 3
BeitragVerfasst: Fr 18.02.05 12:59 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
Var
  Text : string;
begin
 Text := Form2.Edit1.Text;
end;


War ich wohl zu langsam. ;)

_________________
Result := 42; Application.ProcessMessages;
Silvia Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67



BeitragVerfasst: Fr 18.02.05 13:07 
Danke,

hab noch die Unit.pas (vom Formular, uses Unit2) im implementations Bereich eingebunden und es klappt!