[Gambas-user] Gambas 3 Grid/Table question

Rolf-Werner Eilert eilert-sprachen at ...221...
Mon Nov 15 08:58:46 CET 2010


Am 13.11.2010 02:01, schrieb Benoît Minisini:
>> Sorry, I was kinda tired this morning :-)
>>
>> There is a linewrap in the Gridview even with Gambas 2, but it is a
>> default (at least I have not yet found a way to deactivate it) and it
>> does not by itself adjust the line height appropriately.
>>
>> So the question would have to be: Is there a more specific way to define
>> this in Gambas 3? For instance:
>>
>> Tableview1.Columns[3].WordWrap = TRUE
>> Tableview1.Columns[3].Width = 125
>> Tableview1.AdjustRowHeight = TRUE
>>
>> would activate wordwrap for column 3, define a width of 125 px for this
>> column and start automatic row height adjusting for the whole table...
>> Maybe this would make sense for single rows? Then
>>
>> Tableview1.Rows[2].AdjustRowHeight = TRUE
>>
>> would be good, but I can't imagine a case where this might be good.
>>
>> Regards
>>
>> Rolf
>>
>
> In Gambas 3, WordWrap is a property attached to the cell. And to adjust the
> width of a row or a column, you must set its height (or width) to "-1". But,
> if I remember well, it is not implemented in gb.gtk yet.
>
> Maybe a WordWrap property at the column level may be useful then?
>

Definitely yes! I think, this is where it makes most sense. But it is 
not very useful without RowHeight adjusting automatically, too. If you 
cannot add something like an AdjustRowHeight property, there should at 
least be an event and a property that can be read telling me how many 
lines the fullest cell has on this line (to enable me to adjust the 
RowHeight by my own code).

What I meant above was, I don't know if an AdjustRowHeight property 
makes sense on Row level.

Regards

Rolf





More information about the User mailing list