views:

264

answers:

1

Hi dudes,

I have a project using DevExpress docking components, I create forms in run-time, which are attached into dockpanels components, my problem is that OnClose event of these forms are suppressed when closing dockpanels and doesnot execute its code existing there, it is important TForm's OnClose event is executed 'cause there are taks that must be done. Any advice?

Thanks in advance.

+1  A: 

Two ideas:

  1. If the docked forms are destroyed when the dock panel is closed: Move the code from the OnClose event to the form's constructor.
  2. If the dock panel class has an event similar to OnClose: Extract the relevant code from OnClose into a separate method and call this method from both the form's OnClose and the panel's OnClose.
Ulrich Gerhardt
It would be on OnDestroy event. But thanks, problem was resolved.
Billiardo Aragorn