in reply to Getting element from List box in Perl tk
First of all you should always start your program with
use strict; use warnings;
You are looking for something like this:
See Tk::Listbox for documentation of the get() and curselection() methods.$lb -> bind('<Double-1>'=> sub { print $_[0]->get($_[0]->curselection), + "\n"; }, );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting element from List box in Perl tk
by vr786 (Sexton) on Nov 24, 2010 at 12:33 UTC |