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

Re: Tk Listbox problem

by bobn (Chaplain)
on Jul 21, 2003 at 17:32 UTC ( #276366=note: print w/ replies, xml ) Need Help??

in reply to Tk Listbox problem

From perldoc Tk::Listbox, I can only come up with:

foreach my $tape (@stored_tapes, '<NONE>') {$remove_list->insert('end',$tape);} $remove_list->activate('end'); #Show the $remove_dialog box to the user my $remove_result = $remove_dialog->Show;

In the absence of selection, returns '<NONE>'. You might want to set -selectmode' to multiple or extended to allow more than one selection at a time.

--Bob Niederman,

Comment on Re: Tk Listbox problem
Download Code
Replies are listed 'Best First'.
Re: Re: Tk Listbox problem
by Grygonos (Chaplain) on Jul 21, 2003 at 17:58 UTC
    clarification of my previous post.. I want the script to throw an error or prompt for proper input when a user fails to make a selection in the listbox.
    Edit: Thanks for the curselection tidbit. Does anyone know of a better way of reading perldoc on win32... dos shell blows.

      If Show returns '<NONE>' prompt the user again, thought the curselection() method noted below does look a bit more elegant.

      Also, on my winNT AS 5.6.1 system, perldoc works, if I recall (don't have it here right now). In any event, there shpould be a an item in Start->Programs for ActiveState Perl Documentation, or somethng to that effect.

      --Bob Niederman,
      Tk is a standard module with ActiveState, and AS ships HTML docs. Mine is here: D:/Perl/html/site/lib/Tk/Listbox.html. If you're online, try

      That being said, I installed less for windows, changed the background color of my command prompt. Except for the OLE object browser, I don't use the HTML docs any more.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2015-11-29 04:53 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls