Telling you to go look at the Tk::Image module to create the image.-image => value Specifies an image to display in the menu instead of a text string + or bitmap The image must have been created by some previous invocati +on of image create. This option overrides the -label and -bitmap opti +ons but may be reset to an empty string to enable a textual or bitmap + label to be displayed. This option is not available for separator or + tear-off entries.
If you want to use the 'images' from the Tk::Toolbar I think you will have to use the -bitmap option on the menu item rather than -image.
In addition, you have not used a geometry manager on your widgets in the code you showed us, so you wouldn't see anything anyway! Even the very simple example in Tk::Compound will give you some clues:
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;
In reply to Re: Placement of image with Tk::Compound and Tk::Menu
by jdtoronto
in thread Placement of image with Tk::Compound and Tk::Menu
by ldln
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |