[Gambas-user] gridview row heights when cell is wrapped
Benoît Minisini
gambas at ...1...
Wed May 1 13:44:23 CEST 2013
Le 01/05/2013 13:10, Benoît Minisini a écrit :
> Le 01/05/2013 08:05, Bruce a écrit :
>> On Mon, 2013-04-29 at 17:09 +0200, Benoît Minisini wrote:
>> \
>>>
>>> Mmm, strange... Can you make a little project that reproduces the bug
>>> for me?
>>>
>> [Repost: I don't know whether the reproduction project actually made
>> it?]
>> B
>>
>
> The problem comes from the fact that the GridView contents layout is
> delayed, and so the column has not yet its final width during the
> Form_Open() event handler, or in the constructor.
>
> Note that this is not the case with gb.gtk.
>
> I will investigate to understand why there is a difference, but I don't
> think I will be able to guarantee when the last GridView column will
> have its final size.
>
> Maybe the solution could be that setting -1 to a row height acts like a
> flag.
>
Well, I don't think I will "fix" that: actually, gb.qt4 delayed the
layouting of container as much as possible (i.e. container arrangement
is done only if it is visible). This is a big optimization. For example,
when running the IDE and opening some project, the arrangement routine
is called more than three times less.
gb.gtk behaves differently because that optimization has not be
implemented in it yet.
I suggest you layout your GridView when you know that the arrangement
routine has been called, i.e. inside the Form_Arrange() event handler.
Regards,
--
Benoît Minisini
More information about the User
mailing list