[SOLVED] Postion scrollbar at Multilist

qwertzui11

14-03-2009 18:23:08

Hi all

Bug:


Have I done something wrong or is it a little bug?

Markus

Altren

14-03-2009 19:35:27

You should use smaller columns, when calculating width of them don't forget that sum of columns widths != width of widget. You should use client width for your calculations. Use getClientCoord function for getting size of client area.

qwertzui11

14-03-2009 20:18:30

So I shall set the width every frame new?

Markus

Altren

14-03-2009 20:45:50

Er, what? Just set a bit smaller column width.

qwertzui11

14-03-2009 20:54:00

The scrollbar will only appear when there r enough player. So, if I'll set it smaller and there will be some pixel space without usage.
What I wnat to say is that without Scrollbar it looks perfect and when I set the second Subitem smaller there r ca 10px widtch for nothing.

Markus

Altren

14-03-2009 21:19:59

Look at layout editor UserData panel: I just setting width at start and on resizing whole panel. const MyGUI::IntSize & size = mMultilist->getClientCoord().size();
mMultilist->setColumnWidthAt(0, size.width / 2);
mMultilist->setColumnWidthAt(1, size.width - (size.width / 2));
So if you nor resizing multilist you need to set size once.

qwertzui11

04-04-2009 13:13:25

Hi

I'm initializing:
m_pGUIPlayers->addColumn(m_pGUIPlayers->getWidth() - 75, "Player");
m_pGUIPlayers->addColumn(75, "Status");


The error was
m_pGUIPlayers->getWidth()

Correction:
mMultilist->getClientCoord().size().width

Thx for help!

Markus