Have just started using Perl Tk and am creating a compound button widget. Am pretty much adapting the compound button creation example from "Mastering Perl Tk" as follows:
my $bttn = $mw->Button; my $c = $bttn->Compound; $c->Space(-height => 10); $c->Line; $c->Space(-width => 10); $c->Text(-text => "A name", -font => 'times 19'); $c->Image(-image => $bttn->Photo(-file => "an_image.png") ); $c->Space(-width => 10); $c->Line; $c->Space(-height => 10);
This code is run within a loop of names/ images and does indeed spit out a list of buttons that represent what is required - however I'd like to align all the image files to the right of each button and fix the button widths so that they appear visually aligned as if in a vertical column. (Clearly the text for "A name" is of variable length, which explains why they are not currently aligned but ragged).
I'm reading docs without much luck. Any ideas how to do this?In reply to Perl Tk compound formatting by CColin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |