How find Column's ListboxItem of MultiColumnList?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

yuunanase
Just popping in
Just popping in
Posts: 4
Joined: Sat Nov 01, 2008 07:19

How find Column's ListboxItem of MultiColumnList?

Postby yuunanase » Sun Dec 07, 2008 13:50

My English is very poor
I hope you know my mean

Code:
mrankingbrothers =(CEGUI::MultiColumnList*)cewin->getWindow((CEGUI::utf8*)"BattleRoot/RankingBrothers");
mrankingbrothers->addColumn("Name",0,CEGUI::UDim(0.3f, 0.0f));
mrankingbrothers->addColumn("Score", 1, CEGUI::UDim(0.55f, 0.0f));
mrankingbrothers->setUserColumnSizingEnabled(FALSE);


//addrow...
CEGUI::ListboxItem* nameItem;
int id=0;
string name="abc";

nameItem = new CEGUI::ListboxTextItem(int2str(id));
unsigned int row = mcl->addRow();
mcl->setItem(nameItem, 0, row);

nameItem = new CEGUI::ListboxTextItem(name);
mcl->setItem(nameItem, 1, row); <<-----this nameItem,I want to find



then,How find mcl.row(0,1) ListboxItem*
I don't have find any function for this

Please,Tell me

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sun Dec 07, 2008 15:50

Hi,

I'm not sure what inputs you want to give (such as 'name' string, pointer to ListboxItem, something else?), nor what outputs you're wanting (pointer to item, grid reference?).

If you want to find an item with a specified string, you can use MultiColumnList::findListItemWithText which you pass in a string and get back a pointer to the item.

If you have the item and want the grid location, you can use MultiColumnList::getItemGridReference

If these answers are no good, please specify what information you have that you can pass as input, and what you want back as output.

CE.

yuunanase
Just popping in
Just popping in
Posts: 4
Joined: Sat Nov 01, 2008 07:19

thanks

Postby yuunanase » Mon Dec 08, 2008 02:32

I find CEGUI::getItemAtGridReference

thanks

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Dec 08, 2008 12:58

Aha, the one option I failed to mention :) Glad you found it anyway.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 3 guests