For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > April 2006 > HOWTO Bind to a listbox <<ListboxSelect>>









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author HOWTO Bind to a listbox <<ListboxSelect>>
gormanst

2006-03-24, 7:05 pm

All,

I can't figure out how to bind this virtual event to a function in
Perl/Tk. Does anyone have a simple example of how to bind this event in
Perl/Tk.

Steve Lidie

2006-03-24, 7:05 pm

gormanst <gormanst@saic.com> wrote:
> All,
>
> I can't figure out how to bind this virtual event to a function in
> Perl/Tk. Does anyone have a simple example of how to bind this event in
> Perl/Tk.
>


Chapter 7, p. 159 of Mastering Perl/Tk

e.g.

$mp3s->bind( '<<ListboxSelect>>' => sub { play $mp3s->curselection } );

The event is triggered whenever the Listbox selectino changes.
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
gormanst

2006-04-08, 10:00 pm

Thank you very much.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com