You're quite right Eric, I guess I thought it was built in to the object.
But the annoying thing is that you can just assign it once, you have to
assign it every time you populate the ListView with data. A quick way to do
it is:

        for $i(0..$totalcols)
                {$ListView->ColumnWidth($i,-2);}

I think you have to keep manual track of the total number of columns, I
don't think there is a $ListView->ColumnCount(), although it would be nice
to have.
                Thanks for your help Eric, I eagerly await some of the other
items I mentioned.
                                Tim.

----------------------------------------------------------------------------
---------------------
Tim Thomas
Unix Systems Administrator
Lockheed Martin EIS · Denver Data Center
303-430-2281 · Pager 800-545-3704
mailto:[EMAIL PROTECTED]
Pager: mailto:[EMAIL PROTECTED]
----------------------------------------------------------------------------
---------------------

> -----Original Message-----
> From: Eric C. Hansen [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 10, 1999 2:48 PM
> To:   [EMAIL PROTECTED]
> Subject:      [perl-win32-gui] RE: ListView Questions
> 
> Tim, I have not tried this, but the GUI Docs say use method ColumnWidth().
> 
> ColumnWidth(COLUMN, [WIDTH])
> Gets or sets the width of the specified COLUMN; WIDTH can be the desired
> width in pixels or one of the following special values:
> 
>   -1 automatically size the column
>   -2 automatically size the column to fit the header text
> 
> Let me know if this works please.
> 
> Regards,
> Eric
> 
> 
> -----Original Message-----
> From: Tim B. Thomas [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 10, 1999 3:29 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: ListView Questions
> 
> 
> Eric,
>     Seems that you are the ListView expert. Here's some questions for
> you or Aldo:
> 
> How do you get the columns to be automatically sized? I used to be able
> to do this, but can't find my old scripts. What's wrong with this
> syntax? I thought it was -1 and -2, but I must be missing something.
>   $ListView->InsertColumn(-index=>0, -width=>-1, -text=>"Col1",);
>   $ListView->InsertColumn(-index=>1, -subitem=>1, -width=>-2,
> -text=>"Col2",);
> 
> Has Aldo put in a way to sort the listview object, like the listbox
> object? What would be really cool is to have it automatically sort by
> the first column initially, then when you click on a column heading, to
> sort by that column. If that was all build in to the ListView function,
> that would be really cool. Maybe with options like: -sort=>1 and
> -colsort=>1
>     If not - Can we get this?
> 
> Has Aldo put in a right click method for listview?
>     If not - Can we get this?
> 
>             Thanks,
>                 Tim.
> 

Reply via email to