Page 1 of 1

[to be fixed in 0.7] MultiColumnList items cannot fill space

Posted: Wed Mar 18, 2009 19:21
by Mikademus
I use MutliCOlumnLists with fixed contents in my app, but they look quite bad because they cannot fill the entire window or even encroach into the space where scroll bars would be if there were any or the scrollbars will be displayed. Especially since the default style has coloured backgrounds in the header row I want my items to fill the entire width of the rows.

Anyone who knows how to do this, preferably without editing the CEGUI code?

Related to this 2007 feature request (complete with code patches): http://www.cegui.org.uk/phpBB2/viewtopi ... highlight=

Posted: Wed Mar 18, 2009 20:29
by CrazyEddie
Hi,

I know there are some issues here, since I was playing with them myself a few days back and thinking that the issue that I saw was a little lame.

Having said this, it may be possible to reduce or eliminate much of the issue by adjusting the named areas in the looknfeel XML (i've not looked, or tried, it's just what came to mind). Which looknfeel are you using?

Most - maybe all - of these "inner rect area" related issues should be fixed by the time 0.7.0 is released, since it's something I'm part way through working on. On top of this the whole MCL will be replaced soon anyway (but probably not for 0.7.0), so I'd rather not spend too much time 'fixing' it - I'm aware that talk of all these future improvements does not help you in the here and now, but it might help to explain if I come across as indifferent with regards to certain issues.

CE.

Posted: Wed Mar 18, 2009 20:55
by Mikademus
Hi!

I'm using the vanilla (Taharez) layout when prototyping. Since the app is still in prototype phase it doesn't matter that it looks a bit wonky (though it messes with my obsessive programmer mentality, of course), and I'm glad to hear its being worked on!

Posted: Thu Mar 19, 2009 15:37
by Jamarr
As a temporary work-around, you may want to just reduce the size of the last column by the width of the vertical scrollbar. It is not an ideal solution, but it is simple and gets rid of the horizontal scrollbar:

Code: Select all

float vsbw = mcl->getVertScrollbar()->getPixelSize().d_width;
mcl->addColumn("COLA") ,0 ,CEGUI::UDim(.5f ,0));
mcl->addColumn("COLB") ,1 ,CEGUI::UDim(.5f ,-vsbw));

Posted: Thu Mar 19, 2009 15:55
by Mikademus
Jamarr wrote:As a temporary work-around, you may want to just reduce the size of the last column by the width of the vertical scrollbar. It is not an ideal solution, but it is simple and gets rid of the horizontal scrollbar:

Code: Select all

float vsbw = mcl->getVertScrollbar()->getPixelSize().d_width;
mcl->addColumn("COLA") ,0 ,CEGUI::UDim(.5f ,0));
mcl->addColumn("COLB") ,1 ,CEGUI::UDim(.5f ,-vsbw));


Thanks for the work-around. I had to change the figures a bit though: if the column width sum >= 1.0 the scrollbar will be displayed. So in your example you have to use "UDim(.49f ,-vsbw)" (or something).