Recent

Author Topic: Child Form's OnCloseQuery and OnClose Events not received.  (Read 843 times)

mtrsoft

  • New Member
  • *
  • Posts: 44
Child Form's OnCloseQuery and OnClose Events not received.
« on: July 12, 2020, 05:40:17 am »
System Is:
Windows 7 Pro x32
Lasarus 2.04 and FPC 3.04

The basic issue is that the OnCloseQuery and OnClose events aren't being recieved by a child form when it or the application is closed.
(Note: The OnDestroy and OnResize events are received by the child form).

The application is structured like this:

MainForm
  +-- PageControl (TExtendedNotebook) -- Owner and parent is
        the MainForm.
        +-- TFormSheet (a descendant of TTabSheet that has a
              "Form" property). -- owner & parent is the PageControl.)
            +-- Child Form which is assigned to the
                            TFormSheet's Form property. (Owner and parent
                             is the TFormSheet)
              This child form does not receive the
                             OnCloseQuery and OnClose events, but it does
                             receive the OnDestroy  and OnResize events.

What am I missing?

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Child Form's OnCloseQuery and OnClose Events not received.
« Reply #1 on: July 12, 2020, 11:02:09 am »
You should replace child forms with frames. If I remember correctly, building MDI forms is currently supported only in trunk and only for win32 and qt widgesets.

mtrsoft

  • New Member
  • *
  • Posts: 44
Re: Child Form's OnCloseQuery and OnClose Events not received.
« Reply #2 on: July 12, 2020, 06:50:44 pm »
@Cyrax,

Thanks for the suggestion. I'll consider it.

 

TinyPortal © 2005-2018