Scilab 5.3.0
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
seteventhandler
set an event handler for the current graphic window
Calling Sequence
seteventhandler(sfun_name) seteventhandler('')
Arguments
- sfun_name
a character string. The name of the Scilab function which is intended to handle the events
Description
The function allows the user to set a particular event handler for
the current graphic window. seteventhandler('')
removes the handler.
For more information about event handler functions see the event handler functions help.
Examples
function my_eventhandler(win, x, y, ibut) if ibut==-1000 then return,end [x,y]=xchange(x,y,'i2f') xinfo(msprintf('Event code %d at mouse position is (%f,%f)',ibut,x,y)) endfunction plot2d() seteventhandler('my_eventhandler') //now: // - move the mouse over the graphic window // - press and release keys shifted or not with Ctrl pressed or not // - press button, wait a little release // - press and release button // - double-click button seteventhandler('') //suppress the event handler
<< locate | interaction | xclick >> |