Posted on 2005-04-12
In VB I can do this
Dim F as Form
In Delphi this is not possible (or is it?). Because each form is a class of its own.
The above works!
However, if I add a textbox control to FormEdit it doesn't work because the base class of TForm doesn't have a text box but TFormEdit does!
This naturally fails!
What I am trying to do is this.
I have several forms for different purposes. But each form uses the same Lookup Form for looking up the same data. It always inserts the same data into the same named controls but on different forms.
The scripts are quite long and complex, is there a way of running the same script against different forms without repeating the same script 5 or 6 times like this.
If (FEdit1<>nil) and (FEdit1.visible=true) then
If (FEdit2<>nil) and (FEdit12.visible=true) then
The script is always the same but refers to different forms