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

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to