
74 Perl/Tk Pocket Reference
$subwidget
Invoke
$subwidget->configure(-option => value)
$self -> ConfigSpecs(-option => [{-option1 => $w1, -option2
=> [
$w2, $w3 ]}, dbName, dbClass, fallback]);
So $self->configure(-option => value) actually does:
$w1->configure(-option1 => value);
$w2->configure(-option2 => value);
$w3->configure(-option2 => value);
$self->ConfigSpecs(‘DEFAULT’ => [where]);
How to handle default configure requests.
$self->Delegates(methodName => $w1 ?, ‘DEFAULT’ =>
$w2?);
Redirect composite widget method methodName to sub-
widget $subwidget. Multiple method/widget pairs can be
specified.
$self->Subwidget(subwidgetName);
Return the widget reference belonging to the advertised
subwidget subwidgetName.
12. Images
Images are created using the DefineBitmap, Bitmap, and
Photo methods, described below. Bitmaps have a pixel
depth of 2 bits, whereas Photos can be full color 24 bit XPM,
GIF, PPM or XBM objects.
$widget->Getimage(name);
Given name, look for an image file with that base name
and return a Tk image object. File extensions are tried in
this order: xpm, gif, ppm, xbm until a valid iamge is found.
If no image is found, try a built-in image with that name.
$widget->DefineBitmap(bitmapName, bitColumns, bitRows,
bitVector);
Define a bitmap named bitmapName directly in Perl code.
The first bitColumns bits packed in bitVector are row one.