MDI child reference HELP PLEEZ 
Author Message
 MDI child reference HELP PLEEZ

Ok I have an mdi parent active with several child windows.  User selects file
/open picks a file..how do I reference the ACTIVE child from the parent?  from
within the child I can use ME, but how do I trigger it from the parent form??

background: I have designed, basically, a text editor, i want the specific
child to open th efile that is selected and read into a variable.

another answer would be ..how do I reference a variable defined in the parent
from the child?

that would work too

any help will be VERY VERY appreciated.

thanx
--
           _ _ _        /|    /

|_____________________   | <   754 Manchester    Illinois State University
         / | | | \    \  |  \  Normal IL, 61761-2583  <8-)



Fri, 26 Sep 1997 03:00:00 GMT  
 MDI child reference HELP PLEEZ


Quote:

>Ok I have an mdi parent active with several child windows.  User selects
file
>/open picks a file..how do I reference the ACTIVE child from the parent?  
from
>within the child I can use ME, but how do I trigger it from the parent
form??

OK, here is the problem: you may not reference variables or subs in the
child, only properties (like tag) or events (like click).  (At least that is
the way I understand it, if someone knows of a way, I would love to hear
it).  The way I do what you describe is to design two menu structures that
are nearly identical, one on the parent and one on the child.  When a child
is the active form in the parent, the child menu replaces the parent menu.  
Since the selection for File|Open would be from the child menu, you can
still use ME to do your operations.

To reference a property or event of the active child, use the ActiveForm
property:  MDIForm1.ActiveForm.tag = "Child1" will set the active child
form's tag property to "Child1".  If there are no active children,
activeform returns an error.

Hope this helps.

-----------------------
Bob Robinson

Atlanta, GA



Fri, 26 Sep 1997 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Make a reference to a MDI form with a reference of a MDI child form

2. MDI Form with MDI Child in referenced DLL

3. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

4. Help with MDI Forms and MDI child forms

5. need help regarding scroll bar in mdi and mdi child form

6. Help: Change a MDI child's parent MDI form at run-time

7. MDI Child Form Reference Invalid

8. Referencing MDI Child forms?

9. Getting a MDI child window from an referenced EXE

10. MDI problem, com MDI to MDI-child

11. MDI problem, com MDI to MDI-child

12. MDI problem, com MDI to MDI child

 

 
Powered by phpBB® Forum Software