Board index » delphi » MDI child, notification of parent's form main menu , when child form is closing

MDI child, notification of parent's form main menu , when child form is closing

Hello all,

i'm searching for a solution for the following problem :

1. A MDI child is activated via a menu entry of the parent form
(OnClick => CreateTheChild and Show). As long as the child is active,
the corresponding menu entry of the main form (parent) for activating
the child shall be disabled (not the big problem, there is an OnClick
event).
2. When the MDI child is closing (via close button of the child form
or whatever), the menu entry of the main form (parent) shall be
enabled again.

Regards,

Hartmut

 

Re:MDI child, notification of parent's form main menu , when child form is closing


Quote
In article <01bfd551$31617100$e40c14d5@hsoft1>, H. Hoffmann wrote:
> i'm searching for a solution for the following problem :

> 1. A MDI child is activated via a menu entry of the parent form
> (OnClick => CreateTheChild and Show). As long as the child is active,
> the corresponding menu entry of the main form (parent) for activating
> the child shall be disabled (not the big problem, there is an OnClick
> event).

> 2. When the MDI child is closing (via close button of the child form
> or whatever), the menu entry of the main form (parent) shall be
> enabled again.

Hartmut,

define a message-based communication protocol between child and main form or give the
child a custom event that the main form can attach a handler to. Then fire the event from
the childs OnClose event. This is probably the more "natural" way to do it in Delphi.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads