Re: clist question



On Friday 11 May 2001 09:35, refering to Re: clist question, Bogdan 
M.Maryniuck wrote:
On Thursday 10 May 2001 21:44, Ken Huisman wrote:
+--->

| Hi everyone,
| is there a way to get the total number of rows of data
| in your clist?
| another question: when do the "add" and "remove" signals
| (gtkcontainer) get triggered on a clist?
| thanks.
| Ken

+--->


So, I answer on it:

   Hello, Ken!
Something like this (untested):

my $ctxt="";
my $cidx=0;
while (!$ctxt) {
      $ctxt=$clist->get_text($cidx,0);
      defined($ctxt) ne "" ? $cidx++ : last;
}
print "We have $cidx items in \$clist\n";


That works too but is very slow on large lists. $clist->rows(); is nore 
suitable.

-- 

Suma inteligentei de pe planeta este constanta,
insa populatia se afla in continua crestere.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]