Board index » delphi » Disabling controls on panel from MDI child form

Disabling controls on panel from MDI child form

Hi folks

I have the following problem and was wondering if anyone has a solution
for that:

I'm working on a MDI application with Delphi 2.0 and want a toolbar in
the MDI main form. The controls in the toolbar (speed buttons) should be
enabled/disabled dependent on the status of the active child form.

But when I set the "Enabled"-property of the speed button out of the
child form, nothing happens. The speed button doesn't get grayed, its
event procedure is still called, when I press it. But when I read the
"Enabled"-property it correctly says "FALSE".

The problem seems to be, that the MDI child is the active window. When
the main form is the only active window and I set the properties,
everything works fine.

Has anybody any ideas? Am I missing something obvious? Is there another
way to implement toolbars in MDI-applications.

Please email your answers to ts...@ping.at

TIA

Thiemo Sammern
ts...@ping.at

 

Re:Disabling controls on panel from MDI child form


Try using the Screen.OnActiveFormChange method. Refer to the on-line
help documentation for more info. ;-)

Hope this helps.

Keshav. Deshpande

Other Threads