[Scilab-users] Handle event ibut=-1000 (closing figure window, red cross)

Serge Steer Serge.Steer at inria.fr
Wed May 13 14:12:11 CEST 2015


Le 13/05/2015 10:54, khannes a écrit :
> Hello everyone!
>
> Is there a chance to stop the the current figure window from closing,
> although the red cross (ibut = -1000 in the figure event handler) was hit?
yes, you can set the figure closerequestfcn property to a function name

example
f=gcf()
function myclose(), disp("hello");endfunction
f.closerequestfcn="myclose"

The each time you hit the red cross the hello message is send

To kill the window one then has to call delete(f)

Serge Steer
> Is there kind of an interrupt that could halt that?
> I did not figure out how i could manage to do that so far!
>
> Thank you in advance!
>
> Best regards,
> Hannes
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Handle-event-ibut-1000-closing-figure-window-red-cross-tp4032258.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>




More information about the users mailing list