Page 1 of 1

Advanced grid widget

Posted: Thu Jan 10, 2019 09:13
by andrewc
All,

I'm currently reimplementing some GUI functionality from wxWidgets into CEGUI, and need to be able to reproduce the general look and behaviour of the grid in the image below.

grid.png

Specific things I need are the ability for cells to span multiple rows, columns or both, and for cells to have different background colours.

In the interests of saving myself a lot of work and not reinventing the wheel, has anybody already written code that can do this? If so, can you please point me at where I can find it. If not, any hints for how best to approach the implementation myself would be very much appreciated. I've done quite a lot with CEGUI already, but still struggle a bit with the theoretical framework behind all the interacting components, so it's hard to see the right solution laid out before me.

By the way, I've already done a much more basic version of the grid using the GridLayoutContainer, without large or coloured cells, but I suspect the use of that class is a dead-end for what I need to achieve. Please correct me if I'm wrong on that!

Cheers,
Andrew

Re: Advanced grid widget

Posted: Thu Jan 10, 2019 09:19
by andrewc
Just to add: it's important that I be able to update the grid dynamically and frequently, inserting new rows at any position at any time, with minimum disturbance to the existing layout.

Andrew