Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Aide Scilab >> Graphiques > interaction > seteventhandler


set an event handler for the current graphic window

Calling Sequence




a character string. The name of the Scilab function which is intended to handle the events


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.


function my_eventhandler(win, x, y, ibut)
  if ibut==-1000 then return,end
  xinfo(msprintf('Event code %d at mouse position is (%f,%f)',ibut,x,y))

//   -  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

See Also

  • addmenu — interactive button or menu definition
  • xgetmouse — get the mouse events and current position
  • xclick — Attend une action d'un bouton de la souris, du clavier dans une fenêtre graphique.
  • xchange — transformation de coordonnées de l'échelle courante en pixels et inversement
  • event handler functions — Prototype of functions which may be used as event handler.
  • figure_properties — description of the graphics figure entity properties
Report an issue
<< event handler functions interaction xgetmouse >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:37:23 CEST 2012