On Tue, Mar 31, 2009 at 12:17:24PM -0400, Chas. Owens wrote: > On Tue, Mar 31, 2009 at 11:27, Thomas H. George <li...@tomgeorge.info> wrote: > > I have tried a dozen different ways but can't retrieve an item from a > > list box. With a cursor left clicked > > on the item it is highlighted (= active?) but > > code such as > > > > $selected = $lbox -> get('active'); > > print $selected; > > > > prints the last item in the list. > > > > What am I doing wrong? > > Well, the first thing you are doing wrong is not telling us what > module you are using. Without that we cannot begin to help you. > use Tk; ... $tl1 = $mw -> Toplevel(-height => 500, -width => 300); $lbox = $tl1 -> Listbox -> pack(-fill => 'both'); $lbox -> insert('end', @files);
Tom > > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/