Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Getting element from List box in Perl tk

by lamprecht (Friar)
on Nov 24, 2010 at 11:32 UTC ( [id://873410]=note: print w/replies, xml ) Need Help??


in reply to Getting element from List box in Perl tk

Hi,

First of all you should always start your program with

use strict; use warnings;

You are looking for something like this:

$lb -> bind('<Double-1>'=> sub { print $_[0]->get($_[0]->curselection), + "\n"; }, );
See Tk::Listbox for documentation of the get() and  curselection() methods.

Cheers, Christoph

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

    Thank you very much, now onwards i will follow the rules of Tk

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://873410]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2026-04-10 22:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.