Many of the widget commands for a menu take as one argument an indicator of which entry of the menu to operate on. These indicators are called indexes and may be specified in any of the following forms:
- number
- Specifies the entry numerically, where 0 corresponds to the top-most entry of the menu, 1 to the entry below it, and so on.
- active
- Indicates the entry that is currently active. If no entry is active then this form is equivalent to none. This form may not be abbreviated.
- end
- Indicates the bottommost entry in the menu. If there are no entries in the menu then this form is equivalent to none. This form may not be abbreviated.
- last
- Same as end.
- none
- Indicates ``no entry at all''; this is used most commonly with the activate option to deactivate all the entries in the menu. In most cases the specification of none causes nothing to happen in the widget command. This form may not be abbreviated.
Many of the widget commands for a menu take as one argument an indicator of which entry of the menu to operate on. These indicators are called indexes and may be specified in any of the following forms:
- number
- Specifies the entry numerically, where 0 corresponds to the top-most entry of the menu, 1 to the entry below it, and so on.
- active
- Indicates the entry that is currently active. If no entry is active then this form is equivalent to none. This form may not be abbreviated.
- end
- Indicates the bottommost entry in the menu. If there are no entries in the menu then this form is equivalent to none. This form may not be abbreviated.
- last
- Same as end.
- none
- Indicates ``no entry at all''; this is used most commonly with the activate option to deactivate all the entries in the menu. In most cases the specification of none causes nothing to happen in the widget command. This form may not be abbreviated.
- @number
- In this form, number is treated as a y-coordinate in the menu's window; the entry closest to that y-coordinate is used. For example, ``@0'' indicates the top-most entry in the window.
- pattern
- If the index doesn't satisfy one of the above forms then this form is used. Pattern is pattern-matched against the label of each entry in the menu, in order from the top down, until a matching entry is found. The rules of Tcl_StringMatch are used.
- @number
- In this form, number is treated as a y-coordinate in the menu's window; the entry closest to that y-coordinate is used. For example, ``@0'' indicates the top-most entry in the window.
- pattern
- If the index doesn't satisfy one of the above forms then this form is used. Pattern is pattern-matched against the label of each entry in the menu, in order from the top down, until a matching entry is found. The rules of Tcl_StringMatch are used.
© Author
| Home
| Sitemap
|