Cascade Entries

A cascade entry is one with an associated menu (determined by the #:menu option). Cascade entries allow the construction of cascading menus. The postcascade widget command can be used to post and unpost the associated menu just next to of the cascade entry. The associated menu must be a child of the menu containing the cascade entry (this is needed in order for menu traversal to work correctly).

A cascade entry posts its associated menu by invoking a Tcl command of the form

(#<widget> 'post x y)

where #<widget> is associated menu procedure, and x and y are the root-window coordinates of the upper-right corner of the cascade entry.

On Unix, the lower-level menu is unposted by executing a Tcl command with the form

(#<widget> 'unpost)

where #<widget> is the the associated menu procedure.

On other platforms, the platform's native code takes care of unposting the menu.

If a #:command option is specified for a cascade entry then it is evaluated whenever the entry is invoked. This is not supported on Windows.


© Author | Home | Sitemap