Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
This may be a quite stupid question, but how can I use icons in a tcl GUI created with the tcl::pTk module (used to have a Tk syntax which I am familiar with). My tcl (8.5) is not the lates, and this version does not support png, as the following script demonstrates:
use strict; use warnings; use Tcl::pTk; my $mw = MainWindow->new(); foreach (1..10){ my $btn = $mw->Button( -text => "My command", -compound => 'top', -image => $mw->Photo(-file => 'start.png'), ); $btn->pack(-padx => 10, -pady => 10,); } MainLoop; exit(0);
I could use gif images, but I do not think it is common practice (and I can not make them look nice). What would be standard practice here? Unfortunately I couldn't find any practical advice around that fits my case. Any suggestion is welcome. I am on macOS.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: tcl::pTk GUI icons
by Anonymous Monk on Apr 19, 2018 at 23:11 UTC | |
by chrstphrchvz (Scribe) on Jul 20, 2018 at 03:02 UTC | |
|
Re: tcl::pTk GUI icons
by Anonymous Monk on Apr 19, 2018 at 23:02 UTC |