Announcement

Collapse
No announcement yet.

Zugruff auf Komponente in einem anderen Formular

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Zugruff auf Komponente in einem anderen Formular

    Hallo zusammen.

    Ich hoffe mir kann jemand helfen, ich habe zwei Formulare, TForm1 und TForm2.
    Eine procedure in TForm2 soll eine Komponente in TForm1 verändern.
    Wie kann man das realisiere?

  • #2
    Hallo,
    wenn es nur darum geht z.B. aus der einer procedure in TForm2 den Text eines TEdit (z.B. Edit1) in TForm1 zu ändern, dann geht es so

    TForm1.Edit1.Text:='Hallo

    Comment


    • #3
      Funktioniert das auch wenn TForm2 eine eigene Unit hat, also Unit2

      Comment


      • #4
        Hallo Tobias,

        die Angaben von Stefan <b>TForm1.Edit1.Text:='Hallo'</b> sollen sicherlich <b>TForm2.Edit1.Text:='Hallo'</b> heißen.

        Die Unit von TForm2 muss in TForm1 angegeben.

        Gruß

        Pete

        Comment


        • #5
          Danke Peter,

          Ich werde das mal ausprobieren.
          Mit angeben meinst du sicherlich unter uses eintragen, richtig ?

          Gruß Tobia

          Comment


          • #6
            Hallo Tobias,

            richtig !

            Gruß

            Pete

            Comment

            Working...
            X