Llew_Llaw_Gyffes has asked for the wisdom of the Perl Monks concerning the following question:
Brethren,
Related to my earlier ruminations concerning a Perl/Tk music player (see Tk UI behavioral oddities (solved problem)), I find myself needing to dynamically change the Play/Pause button in response to user actions. Basically, the button image should switch from a Play icon to a Pause icon when play is started, and switch back to a Play icon when playback is stopped. (When paused, the icon should not change, but the button's action should toggle between pause and unpause; but that is, of course, a simple matter to handle within the callback function.)
I cannot, however, find any documented way to do this, short of destroying and recreating the button. Is there in fact any such means?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dynamically altering Tk buttons
by zentara (Cardinal) on Jan 04, 2010 at 14:10 UTC | |
by Llew_Llaw_Gyffes (Scribe) on Jan 04, 2010 at 16:31 UTC | |
by zentara (Cardinal) on Jan 04, 2010 at 17:25 UTC | |
by Llew_Llaw_Gyffes (Scribe) on Jan 04, 2010 at 19:27 UTC | |
by zentara (Cardinal) on Jan 05, 2010 at 12:02 UTC | |
| |
|
Re: Dynamically altering Tk buttons
by Anonymous Monk on Jan 04, 2010 at 07:18 UTC | |
by Llew_Llaw_Gyffes (Scribe) on Jan 04, 2010 at 16:19 UTC |