Re: Widget name from a widget -command?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Widget name from a widget -command?

From: Bryan Oakley <oakley@bardo.clearlight.com>
Date: Tue May 24 2005 - 00:26:11 CEST

mocallins@yahoo.com wrote:
> Is there a universal way to get access to a widget name from its
> associated -command / -postcommand / whatever ?
>
> Similar to %W from the "bind" command.
>
> I've had this issue with just a plain "button" widget and know I'm
> running into it for the "menu" widget "-postcommand" ?
>

Sure, pass it as an argument.

   button .foo.bar.baz -command [list doSomethingUseful .foo.bar.baz]
Received on Thu Sep 29 14:18:40 2005