in reply to Re^2: Placement of image with Tk::Compound and Tk::Menu
in thread Placement of image with Tk::Compound and Tk::Menu
This is the example code from Tk::Compound's documentation with a couple of things added to make it runnable. Note the addition of -side => 'left' as an option to the pack command. Tk::pack is not my genoetry manager of choice, but it is simple for this demonstration. I would suggest developing amore than nodding acquaintance with "Mastering Perl/Tk" by Lidie and Walsh, published by O'Reilly.#!/usr/bin/perl -w use strict; use Tk; use Tk::Compound; my $parent = MainWindow->new(); my $b = $parent->Button; my $c = $b->Compound; $b->configure(-image => $c); $c->Line; $c->Bitmap(-bitmap => 'warning'); $c->Space(-width => 8); $c->Text(-text => "Warning", -underline => 0); $b->pack(-side => 'left'); MainLoop();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Placement of image with Tk::Compound and Tk::Menu
by ldln (Pilgrim) on Jul 05, 2006 at 03:57 UTC | |
by jdtoronto (Prior) on Jul 05, 2006 at 05:57 UTC | |
by ldln (Pilgrim) on Jul 05, 2006 at 09:57 UTC |