Synchronising row heights of two grid layouts

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Synchronising row heights of two grid layouts

Dietrich Streifert
Hello all!

I'm currently searching for a possibility to have two different grid
layouts (each set o a different composite container) where the row
heights of one grid (slave grid) are adapted to the row heights of
another grid (master grid).

As every row can contain different widgets with different dimensions in
the master grid, the slave grid should adapt those different row heights.

Does anyone have a fast idea for me?

Thank you
Regards
Dietrich


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Synchronising row heights of two grid layouts

John Spackman-3
That’s a tough one to do easily I think; all the key details are private fields in q.u.l.Grid.  It should be easy to hack something together though if the grids are also going to have an identical number of rows and columns.  

I’d copy the entire class, make the private fields public, and create a slave class that proxies all methods through to the master (except the obvious like getCellWidget) and modify renderLayout to read the master’s calculated fields.

John



On 27/10/2015, 13:35, "Dietrich Streifert" <[hidden email]> wrote:

>Hello all!
>
>I'm currently searching for a possibility to have two different grid
>layouts (each set o a different composite container) where the row
>heights of one grid (slave grid) are adapted to the row heights of
>another grid (master grid).
>
>As every row can contain different widgets with different dimensions in
>the master grid, the slave grid should adapt those different row heights.
>
>Does anyone have a fast idea for me?
>
>Thank you
>Regards
>Dietrich
>
>
>------------------------------------------------------------------------------
>_______________________________________________
>qooxdoo-devel mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Synchronising row heights of two grid layouts

Dietrich Streifert
Hi John,

That sounds good! I'll derive from q.u.l.Grid and add a property master
which holds the master grid instance. A method should walk through the
master grid cell dimensions and replicate those dimension to the slave.
The slave should attach event listeners for appear and resize to be able
to detect dimension changes.

Let's call it q.u.l.MasterSlaveGrid!

Perfect.

Thank you John!

Dietrich



Am 27.10.2015 um 14:47 schrieb John Spackman:

> That’s a tough one to do easily I think; all the key details are private fields in q.u.l.Grid.  It should be easy to hack something together though if the grids are also going to have an identical number of rows and columns.
>
> I’d copy the entire class, make the private fields public, and create a slave class that proxies all methods through to the master (except the obvious like getCellWidget) and modify renderLayout to read the master’s calculated fields.
>
> John
>
>
>
> On 27/10/2015, 13:35, "Dietrich Streifert" <[hidden email]> wrote:
>
>> Hello all!
>>
>> I'm currently searching for a possibility to have two different grid
>> layouts (each set o a different composite container) where the row
>> heights of one grid (slave grid) are adapted to the row heights of
>> another grid (master grid).
>>
>> As every row can contain different widgets with different dimensions in
>> the master grid, the slave grid should adapt those different row heights.
>>
>> Does anyone have a fast idea for me?
>>
>> Thank you
>> Regards
>> Dietrich
>>
>>


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel