Eric C. Hansen wrote:
> Each time you load your ListView, keep track of the number of columns of
> data in a variable such as $lastcol. Then, before you reload the ListView
> with new rows and columns, issue the following:
> 
>  # $LV is the ListView Object
> 
>  # clear rows
>  $LV->Clear();   # or $LV->Reset();
> 
>  # clear column headings
>  for($i=$lastcol;$i>=0;$i--) {
>     $LV->DeleteColumn($i);
>  }

a simpler (possibly faster) variant:

    for(0..$lastcol) {
        $LV->DeleteColumn(1);
    }

since column indexes are just progressive numbers, repeatedly deleting 
number one you end up with all column deleted.

>  Now your ListView is clear for loading new column headings and rows of
> data. This is one way. There may be other ways people have come up with.

unfortunately, the SDK API doesn't provide a ColumnCount method.

cheers,
Aldo

__END__
# Aldo Calpini
%_ = split undef, join ' ', qw(fahokem 
xritajbugne csuctawer jhdtlrnpqloevkshpr
); print map $_{$_}, sort keys %_;




Reply via email to