JDN
asked on
Control the MDI parent from within the child
Hi experts,
I'm writing a MDI application with one main MDI form and several MDI childs. What I like to do is to access components on the main form from within the MDI child. For example: when the user enters some data in a MDI child form, I want to display some labels on the main form or put some text in the statusbar, which also resides on the main form.
I cannot simply define the main form in the uses-clause of the child because the child is already in the uses-clause of the main form, therefore a cross reference error is reported by the compiler.
Can anyone tell me how to do this?
Thanks,
JDN
I'm writing a MDI application with one main MDI form and several MDI childs. What I like to do is to access components on the main form from within the MDI child. For example: when the user enters some data in a MDI child form, I want to display some labels on the main form or put some text in the statusbar, which also resides on the main form.
I cannot simply define the main form in the uses-clause of the child because the child is already in the uses-clause of the main form, therefore a cross reference error is reported by the compiler.
Can anyone tell me how to do this?
Thanks,
JDN
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK, thanks. This works fine!
In fact, if you just reference the main form in your code, when you compile you application, Delphi will ask you if you want to put the main form's unit in the uses clause.
J.