Re: Clist column width

On 06/07/01 Major Csaba wrote:
On Wed, Jun 06, 2001 at 01:21:38PM -0400, Chas Owens wrote:
Do you mean the lenth of the string in the cell or the actual pixel
length of the cell?

string length is easy: $len = length($clist->get_text($row, $col));

pixel length is damn near impossible as far as I know, the closest I
have gotten is

  Thanks for your quick answer! But I would like to know the "pixel length"
of a column. At the beginning I know it, but the user can freely modify it
as he wants. I tried to use the resize_column signal, but I didn't get the
size (only the number of the resized column).

The width of the column should be the third argument to your signal
handler (the second is the column number).
Another way to get the column width could be also getting the
allocation of the title widget for the column.

        my $widget = $clist->get_column_widget ($column);
        my ($x, $y, $width, $height) = @{$widget->allocation};


lupus debian org                                     debian/rules
lupus ximian com                             Monkeys do it better

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