# Create a top-level window that displays a bunch of iconic buttons.
-text
=> ['This window shows three ways of using bitmaps or images in radiobuttons and checkbuttons. On the left are two radiobuttons, each of which displays a bitmap and an indicator. In the middle is a checkbutton that displays a different image depending on whether it is selected or not. On the right is a checkbutton that displays a single bitmap but changes its background color to indicate whether or not it is selected.', qw
/-wraplength 5i/],
-title
=> 'Iconic Button Demonstration',
-file
=> Tk
->findINC('demos/images/flagup'),
-maskfile
=> Tk
->findINC('demos/images/flagup'),
-file
=> Tk
->findINC('demos/images/flagdown'),
-maskfile
=> Tk
->findINC('demos/images/flagdown'),
my $frame = $TOP->Frame(qw
/-borderwidth 10/);
$frame->pack(qw
/-side top/);
my(@pl) = qw
/-side left -expand yes -padx 5m/;
my $frame_left = $frame->Frame;
my $frame_b1 = $frame->Checkbutton(
-selectimage
=> 'flagup',
$frame_b1->configure(-selectcolor
=> $frame_b1->cget(-background
));
my $frame_b2 = $frame->Checkbutton(
-bitmap
=> '@' . Tk
->findINC('demos/images/letters'),
-selectcolor
=> 'SeaGreen1',
@pl = qw
/-side top -expand yes/;
my $frame_left_b3 = $frame_left->Radiobutton(
-bitmap
=> '@' . Tk
->findINC('demos/images/letters'),
$frame_left_b3->pack(@pl);
my $frame_left_b4 = $frame_left->Radiobutton(
-bitmap
=> '@' . Tk
->findINC('demos/images/noletters'),
$frame_left_b4->pack(@pl);