get method.

Hello All,

I am using my "$frm=$lb2->get('active')" statement to get the active element
in the listbox $lb2. I observed that when there is no active element in the
listbox $lb2, the "get" method takes element at the first index as active by
default.
So can I somehow prevent this default functionality of the "get" method.

With Rgds,
Raj
Rajendra [ Sa, 24 Februar 2007 13:18 ] [ ID #1639179 ]

Re: get method.

rajendra wrote:
> Hello All,
>
> I am using my "$frm=$lb2->get('active')" statement to get the active element
> in the listbox $lb2. I observed that when there is no active element in the
> listbox $lb2, the "get" method takes element at the first index as active by
> default.
> So can I somehow prevent this default functionality of the "get" method.

If you are referring to Tk::Listbox you might want to use method 'curselection'
instead ('active' does not mean selected).

HTH, Christoph

--
use Tk;use Tk::GraphItems;$c=tkinit->Canvas->pack;push [at] i,Tk::GraphItems ->
TextBox(text=>$_,canvas=>$c,x=>$x+=70,y=>100)for(Just=>anoth er=>Perl=>Hacker);
Tk::GraphItems->Connector(source=>$i[$_],target=>$i[$_+1])fo r(0..2);
$c->repeat(30,sub{$_->move(0,4*cos($d+=3.16))for( [at] i)});MainL oop
Ch Lamprecht [ Sa, 24 Februar 2007 22:48 ] [ ID #1639183 ]
Perl » comp.lang.perl.modules » get method.

Vorheriges Thema: Extract Session Cookie
Nächstes Thema: It has been no less than five years...