get method.
am 24.02.2007 13:18:20 von Rajendra
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
Re: get method.
am 24.02.2007 22:48:11 von Ch Lamprecht
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@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(@i)});MainL oop