Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語 -
Справка Scilab >> Графики > interaction > seteventhandler


set an event handler for the current graphic window





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
  gcf().info_message = 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 — Wait for a mouse click or an event in a graphic window.
  • xchange — преобразование координат из вещественных в пиксельные
  • event handler functions — Prototype of functions which may be used as event handler.
  • figure_properties — description of the graphics figure entity properties
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Feb 14 15:05:04 CET 2019