[Lazarus] Modifying Form Event

steveg at nevets.com.au steveg at nevets.com.au
Fri Mar 14 05:53:54 CET 2014


> steveg at nevets.com.au schrieb:
>>> On Thu, 13 Mar 2014 22:45:44 +1030
>>> Steve Gatenby <steveg at nevets.com.au> wrote:
>>>
>>>> Hoping somebody may be able to explain why the following doesn't stop
>>>> the Form closing.
>>>>
>>>> Button1 sets the method pointer correctly (I believe), as when closing
>>>> the form the showmessage occurs as expected (and shows the correct
>>>> form
>>>> name).
>
>> would there be any way to accomplish what I'm after then ?
>>  I am trying to indirectly prevent the form closing (by passing the Form
>> to a Method / Proc)
>>  So with no additions to the original forms class or instance.
>
> You can add your handler to the form containing Button1. Then the
> handler is a method, ready for assignment to the OnFormClose of any form
> in your project.
>

Thanks Hans, will try that out

Steve

> DoDi
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>






More information about the Lazarus mailing list