Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Interagieren mit mehreren Forms (https://www.delphipraxis.net/206216-interagieren-mit-mehreren-forms.html)

ratmalwer 30. Nov 2020 21:32

Interagieren mit mehreren Forms
 
Hallo

ich habe eine Form (Form1) mit einem Stringgrid.
Daneben eine Form (Form9) welche mit dem Stringrid von Form1 interagiert z.b:
Code:
Form9.FotoAnzeigen(fileliste[Form1.stringGrid1.row].Quellpfadfilename);
Jetzt möchte ich eine neue Form (Form2) erstellen, welche dann auch mit Form9 interagiert.
Danach möchte ich variabel switchen können zwischen Form1.StringGrid1 und Form2.StringGrid1.

Ungefähr so:
Code:
if form1.active then  FormX:=Findcomponent('Form1') end;  
if form2.active then  FormX:=Findcomponent('Form2') end;  
Form9.FotoAnzeigen(fileliste[FormX.stringGrid1.row].Quellpfadfilename);
Gibt es eine Möglichkeit dies dynamisch bei Form9.open zu machen? Und was wäre der richtige Befehl.
Danke für einen Tipp.

Markus


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:12 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz