Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | display | |
Module | widgets | |
Tool | synclistboxes |
bind an event to a glish event
Synopsis
bind(xevent, gevent, whichbox)
Arguments
xevent
the x event to be bound
Allowed:
X event
gevent
the glish event to be generated
Allowed:
String
whichbox
which listbox should this be bound to
Allowed:
An optional integer
Description
This event works just like other Tk bind events in glish. The only
difference is that there is an optional third argument which specifies
which listbox this binding will apply to. If omitted, the binding
applies to all listboxes in the widget. The widget will emit
an event having the name gevent whenever xevent occurs within the
listboxes which the binding applies to.
Example
# slb is a previously created synclistboxes having 4 listboxes
# bind mouse button 2 to all listboxes
slb->bind('<Button-2>','mb2');
# any button 2 events in any listbox will result in an "mb2" event
# being seen from slb
# bind mouse button 3 to the 2nd listbox
slb->bind('<Button-3>', 'mb3', 2);
# any button 3 events which occur within listbox 2 will result in an
# "mb3" event being seen from slb.
Next: synclistboxes.borderwidth - Function
Up: synclistboxes - Tool
Previous: synclistboxes.background - Function
  Contents
  Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2006-10-15