A canvas item which shows a normal widget. (in gnoclCanvas)
Synopsis
canvasId create widget [-option value...]
Options
- -anchor
- type: ONEOF center, N, NW, NE, S, SW, SE, W or E (default: NW)
- Position of the anchor relative to the widget.
- -coords
- type: list-of-floats
- X and y coordinates of the item.
- -height
- type: integer
- Height of of the widget in pixel.
- -onButtonPress
- type: string (default: "")
- Tcl command which is executed if a mouse button is press inside the item. Before evaluation the following percent strings are substituted:
- %w canvas name
%i item id %t type of event: one of buttonPress, button2Press or button3Press %x x coordinate %y y coordinate %b button number %s state of the buttons and modifiers (bitmask)
- -onButtonRelease
- type: string (default: "")
- Tcl command which is executed if a mouse button is released if it has been pressed inside the item. Before evaluation the following percent strings are substituted:
- %w canvas name
%i item id %t type of event: always buttonRelease %x x coordinate %y y coordinate %b button number %s state of the buttons and modifiers (bitmask)
- -onEnter
- type: string (default: "")
- Tcl command which is executed if a mouse enters the item. Before evaluation the following percent strings are substituted:
- %w canvas name
%i item id %x x coordinate %y y coordinate %s state of the buttons and modifiers (bitmask)
- -onLeave
- type: string (default: "")
- Tcl command which is executed if a mouse enters the item. Before evaluation the following percent strings are substituted:
- %w canvas name
%i item id %x x coordinate %y y coordinate %s state of the buttons and modifiers (bitmask)
- -onMotion
- type: string (default: "")
- Tcl command which is executed if the mouse is moved inside the item. Before evaluation the following percent strings are substituted:
- %w canvas name
%i item id %x x coordinate %y y coordinate %s state of the buttons and modifiers (bitmask)
- -tags
- type: list (default: "")
- List of tags to be associated with this item. A tag must start with a alphabetic character which is followed by zero or more alphabetic or numeric characters.
- -widget
- type: widget-ID
- Widget ID of the widget to be shown.
- -width
- type: integer
- Width of of the widget in pixel.
Description
A widget item allows to display a normal widget inside a canvas.
|