[Gambas-user] TableView gray column width?

Eilert eilert-sprachen at ...221...
Mon May 9 16:17:25 CEST 2005


Benoit Minisini schrieb:
> On Wednesday 04 May 2005 08:32, Eilert wrote:
> 
>>Hi folks,
>>
>>Just ran into this problem: How can I adjust the width of the very first
>>(gray) column in a TableView?
>>
>>It adjusts itself when strings are inserted which are bigger than
>>before, i. e. it widens itself. But it does not narrow afterwards, even
>>when you reduce the number of Rows and Columns to 0 and start all over.
>>
>>The problem is that
>>
>>TableView.Columns[0].Text
>>
>>refers to the first string in the gray column, but
>>
>>TableView.Columns[0].Width
>>
>>refers to the width of the first normal (white) column!
>>
>>In my project, I use the same TableView for 2 different sorts of tables,
>>one which just has the automatic numbers in the gray column and 2 white
>>columns with data, and another one which uses the gray column to display
>>names and has a number of further white cells behind it. When you switch
>>back to the small table, the numbers appear in a very wide gray column,
>>but it cannot be narrowed anymore.
>>
>>What can I do?
>>
>>Rolf
>>
> 
> 
> Did you try to hide the header and to show it again ? Maybe it could help. 
> 
> The QT QTable widget is somewhat specific, so I can't use its features too 
> much.
> 
> Regards,
> 

That was a very great idea, Benoit! :-) Runs perfectly now.

Thanks a lot.

Rolf





More information about the User mailing list