help with listbox's
Moderators: CEGUI MVP, CEGUI Team
Re: help with listbox's
What is the body of this select() function? it is not a CEGUI function or is it?
CrazyEddie: "I don't like GUIs"
Re: help with listbox's
sorry should have added it all in previous post
so what i have so far is the list box populating now
with the event subscribe which sends me to this
so what i have so far is the list box populating now
with the event subscribe which sends me to this
Code: Select all
CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
CEGUI::FrameWindow* pk = static_cast<CEGUI::FrameWindow*>( winMgr.loadLayoutFromFile( "book.layout" ) );
CEGUI::Listbox* list = dynamic_cast<CEGUI::Listbox*>(pk->getChild("LIST"));
MyListItem* item = (MyListItem* )(( const CEGUI::WindowEventArgs& )args ).window;
if ( item->isSelected() )
{
Select_BOOK(item->getID(), pk);
}
Re: help with listbox's
Did you say when you subscribe the event then it doesn't handle it regularly internally anymore? There should be a bool parameter that regulates if you wanna override the internal behavior or not
CrazyEddie: "I don't like GUIs"
Re: help with listbox's
not sure i understand
my subscribe part is
which take me to the select function
my subscribe part is
Code: Select all
list->subscribeEvent(CEGUI::ItemEntry::EventSelectionChanged, CEGUI::Event::Subscriber(&pk::Select, pb));
which take me to the select function
Re: help with listbox's
Sorry i was referring to old functionality. So does this work when you dont subscribe? Can u repeat the issue?
CrazyEddie: "I don't like GUIs"
Re: help with listbox's
ok so if i dont use the subscribe event
none are highlighted if i then click on one it will highlight but no change to dislay the new values so basically same as it was before except items not highlighted if that helps
you say the subcsribe is old functionality behaveriour ?
what should i be useing for this ?
sorry if thats a dumb Q but kinda lost here at the moment as you may have guessed
none are highlighted if i then click on one it will highlight but no change to dislay the new values so basically same as it was before except items not highlighted if that helps
you say the subcsribe is old functionality behaveriour ?
what should i be useing for this ?
sorry if thats a dumb Q but kinda lost here at the moment as you may have guessed
Re: help with listbox's
I think the subscribe stuff is new and its fine to use it but honestly i dont know it too well
CrazyEddie: "I don't like GUIs"
Re: help with listbox's
so as im not having to much joy here could you show me how you would do this
dont mean to be a pain but i really am not getting it at the moment
with the code above it just dosnt seem to pass the id over so all that happens is the selection brush moves to the item i clicked on
dont mean to be a pain but i really am not getting it at the moment
with the code above it just dosnt seem to pass the id over so all that happens is the selection brush moves to the item i clicked on
Re: help with listbox's
When i look for listboxitems i see them mostly used for multicolumnlists and the combobox.
Can you describe exactly what you try to achieve and have you gotten the samplebrowser to run and looked at how something similar is done there? There have been soem larger changes between 0.7 and 0.8 so the approach might be invalid now that you follow?
Can you describe exactly what you try to achieve and have you gotten the samplebrowser to run and looked at how something similar is done there? There have been soem larger changes between 0.7 and 0.8 so the approach might be invalid now that you follow?
CrazyEddie: "I don't like GUIs"
Re: help with listbox's
Hi Ident,
sorry for late reply been busy here
what i'm trying to do here is read a .ini file put the description in the listbox andotherbits in to a couple of editbox's this part i got working fine on startup it reads all the .ini file and adds the descriptions in the listbox great
but what is not working is when i click on another item entry it changes the editbox's i have it down because the listbox entry is not passing the ID over to the subscribed event
still trying to get the samplebrowser to work but looking at the code for the WidetDemo it has
so i think i'm on the right track if i can get the ID passed over
sorry for late reply been busy here
what i'm trying to do here is read a .ini file put the description in the listbox andotherbits in to a couple of editbox's this part i got working fine on startup it reads all the .ini file and adds the descriptions in the listbox great
but what is not working is when i click on another item entry it changes the editbox's i have it down because the listbox entry is not passing the ID over to the subscribed event
still trying to get the samplebrowser to work but looking at the code for the WidetDemo it has
Code: Select all
d_widgetSelectorListbox->subscribeEvent(CEGUI::Listbox::EventSelectionChanged, Event::Subscriber(&WidgetDemo::handleWidgetSelectionChanged, this));
so i think i'm on the right track if i can get the ID passed over
Re: help with listbox's
so what i mean is
each of the listbox items should have its own ID 1 - how many is in the list i.e
1
2
3
4
etc,etc
now if i click on one it should pass that ID over to the selection function
but that dont seem to be happening the list item does get highlighted fine but the select state dont get passed over noor the ID
but if i add this into the above just for testing
then it will work but edit boox dont get updated i do have set to the edit box and can see it should change the text stepping though the locals window
each of the listbox items should have its own ID 1 - how many is in the list i.e
1
2
3
4
etc,etc
now if i click on one it should pass that ID over to the selection function
Code: Select all
CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
CEGUI::FrameWindow* pk = static_cast<CEGUI::FrameWindow*>( winMgr.loadLayoutFromFile( "book.layout" ) );
CEGUI::Listbox* list = dynamic_cast<CEGUI::Listbox*>(pk->getChild("LIST"));
MyListItem* item = (MyListItem* )(( const CEGUI::WindowEventArgs& )args ).window;
if ( item->isSelected() )
{
Select_BOOK(item->getID(), pk);
}
but that dont seem to be happening the list item does get highlighted fine but the select state dont get passed over noor the ID
but if i add this into the above just for testing
Code: Select all
list->setID(1);;
item->setSelected(true);
then it will work but edit boox dont get updated i do have
Code: Select all
box1->invalidate(true)
Who is online
Users browsing this forum: No registered users and 9 guests