Name
event
- event
operation
[arg arg
...] The event command provides several facilities for dealing with window system events, such as defining virtual events and synthesizing events. The following operations are defined:
- event add
<<
virtual
>>sequence
[sequence
...] Add the given event
sequence
s to those associated with the virtual eventvirtual
. The virtual event will trigger whenever any one of the givensequence
s occurs. See the bind command for allowedsequence
values.- event delete
<<
virtual
>> [sequence
[sequence
...] ] Delete the given event
sequence
s from those associated with the virtual eventvirtual
. If nosequence
is given, all sequences associated with the virtual event are removed.- event generate
window sequence
[option value
...] Generate an event for window
window
and arrange for it to be processed just as if it had come from the window system.Window
may be a window pathname or an identifier (as returned by winfo id), as long as it is in the current application. Thesequence
argument describes the event to generate. It may have any of the forms allowed for thesequence
argument to the bind command, except that it must consist of a single event pattern (e.g., <Shift-Button-2
> or <<Paste
>>).The event generated can be further described with the optional optionvalue pairs. In the descriptions of these options that follow, the [%
char
] at the beginning identifies the corresponding bind command substitution. The available options are as follows:- -above
window
[
%a
] The above field for ...
- -above
- event add
<<
Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.