Container for the properties of an event.
This is very similar to a Tkinter.Event, except that it holds a different set of attributes.
Instances of this type are generated if one of the static or dynamic treectrl events occurs.
Static, i.e. installed into the widget by default, events include:
<ActiveItem>: Generated whenever the active item changes.
<Collapse-before>: Generated before an item is collapsed.
<Collapse-after>: Generated after an item is collapsed.
<Expand-before>: Generated before an item is expanded. This event is useful if you want
to add child items to the item just before the item is expanded.
<Expand-after>: Generated after an item is expanded.
<ItemDelete>: Generated when items are about to be deleted by the item_delete() command.
<ItemVisibility>: Generated when items become visible on screen and when items are
no longer visible on screen. This event is useful if you have a
very large number of items and want to assign styles only
when items are actually going to be displayed.
<Scroll-x>: Generated whenever the view in the treectrl changes in such a way
that a horizontal scrollbar should be redisplayed.
<Scroll-y>: Generated whenever the view in the treectrl changes in such a way
that a vertical scrollbar should be redisplayed.
<Selection>: Generated whenever the selection changes. This event gives information
about how the selection changed.
In addition to the pre-defined static events such as <ActiveItem> and <Selection>, new
dynamic events can be created by using the notify_install() command. The following events
may be generated by the library scripts:
<ColumnDrag-begin>
<ColumnDrag-receive>
<ColumnDrag-end>: Generated whenever the user drag-and-drops a column header. The
library scripts do not actually move a dragged column. You must
bind to the receive event to move the column.
<Drag-begin>
<Drag-receive>
<Drag-end>: Generated whenever the user drag-and-drops a file into a directory.
This event is generated by the filelist-bindings.tcl library code,
which is not used by default.
<Edit-begin>
<Edit-accept>
<Edit-end>: The filelist-bindings.tcl code will display a text-editing window if the
user clicks on a selected file/folder name.
<Header-invoke>: Generated whenever the user clicks and releases the left mouse button
in a column header if the column's -button option is true.
You can bind a script to this event to sort the list.
If a callback function for one of these events is registered using notify_bind(),
the callback is called with a TreectrlEvent as first argument. It will have the
following attributes (in braces are the event types for which the attribute is valid):
detail - the detail name, e.g "after" if the event is "<Expand-after>" (all static events).
name - the event name, e.g "Expand" if the event is "<Expand-after>" (all static events).
pattern - the complete event pattern, either "<name>" or "<name-detail>" (all static events).
object - The object argument to the notify_bind() command (all static events).
widget - The treectrl widget which generated the event (all static events).
item - The item id (<Collapse>, <Expand>, <Drag>, <Edit> events).
active - The current active item (<ActiveItem> events).
prevactive - The previous active item (<ActiveItem> events).
deleteditems - List of items ids being deleted (<ItemDelete> events).
visible- List of items ids which are now visible (<ItemVisibility> events).
nonvisible - List of items ids which are no longer visible (<ItemVisibility> events).
lower - Same as the first fraction appended to -yscrollcommand (<Scroll> events).
upper - Same as the second fraction appended to -yscrollcommand (<Scroll> events).
selectcount - Same as the selection_count() widget command (<Selection> events).
deselected - List of newly-deselected item ids (<Selection> events).
selected - List of newly-selected item ids (<Selection> events).
textelement - The name of the edited text element (<Edit> events).
text - The edited text (<Edit> events).
column - The column that was dragged or whose header was clicked
(<ColumnDrag>, <Header-invoke>, <Edit> events).
columnbefore - The column to move the dragged column before (<ColumnDrag> events).
draggeditems - The list of dragged items (<Drag> events).
|