
Common Widget Options 3
sub {...} [sub {...} ?, args?]
‘methodName’[‘methodName’?,args?]
Note that bind callbacks are implicitly passed the bound
object as the first argument of the parameter list. Refer to the
section Bindings and Virtual Events for related information.
To prevent bind from supplying an implicit object reference
to the callback, specify your own object as the first element
of the array:
$a->bind(eventDescriptor, [$b => 'Delete']);
So bind calls Delete with widget $b instead of $a.
Common Widget Options
Some of the widget options common to several widgets are
described here for brevity. For options that take screen units,
values are in pixels unless an optional one letter suffix mod-
ifier is present —
c (cm), i (inch), m (mm), or p (points).
-activebackground => color
Background color of widget when it is active.
-activeborderwidth => width
Width in screen units of widget border when it is active.
-activeforeground => color
Foreground color of widget when it is active.
-anchor => anchorPos
How information is positioned inside widget. Valid
anchorPos values are
n, ne, e, se, s, sw, w, nw,
and center.
-background => color
Background color of widget in normal state.
-bitmap => bitmap
Bitmap to display in the widget (
error, gray12,
gray25, gray50, gray75, hourglass, info,
questhead, question, warning, @pathName).