How to place child windows on top of listboxitem
Moderators: CEGUI MVP, CEGUI Team
How to place child windows on top of listboxitem
That I come up with this question is because I want to solve a problem like below:
/////////////////////////////
// // // ////// ///// //
// 1 2 3
// // // ////// ///// //
/////////////////////////////
Which is one item of a Listbox, I want to place some child windows
on top of this item, but I look into ListboxItem class, it's not derived from Window, yeah,
it has a member that named d_owner, I tried to use it(d_owner->addChildWindow) to add
child windows, but it is wrong, the vs compiler didn't successfully complied it.
Can u follow me? That I want to use Listbox to place some items, which are not as simple as TextItems.
If Listbox can't do me this favour, what shall I do next?I also have thought of ImageButton,
but when I have clicked one ImageButton, it comes back to "Normal" state again, I wanna it be in
Pushed(or selected)
/////////////////////////////
// // // ////// ///// //
// 1 2 3
// // // ////// ///// //
/////////////////////////////
Which is one item of a Listbox, I want to place some child windows
on top of this item, but I look into ListboxItem class, it's not derived from Window, yeah,
it has a member that named d_owner, I tried to use it(d_owner->addChildWindow) to add
child windows, but it is wrong, the vs compiler didn't successfully complied it.
Can u follow me? That I want to use Listbox to place some items, which are not as simple as TextItems.
If Listbox can't do me this favour, what shall I do next?I also have thought of ImageButton,
but when I have clicked one ImageButton, it comes back to "Normal" state again, I wanna it be in
Pushed(or selected)
- Jabberwocky
- Quite a regular
- Posts: 86
- Joined: Wed Oct 31, 2007 18:16
- Location: Canada
- Contact:
Re: How to place child windows on top of listboxitem
Hi Singbol,
You might want to try using CEGUI::ItemListbox. It allows you to put different kinds of things inside of your listbox, like images.
You can even construct a window that has a combination of multiple images and text, and put that inside the ItemListBox.
You should probably put these questions inside the beginner's help forum.
Hope that helps!
You might want to try using CEGUI::ItemListbox. It allows you to put different kinds of things inside of your listbox, like images.
You can even construct a window that has a combination of multiple images and text, and put that inside the ItemListBox.
You should probably put these questions inside the beginner's help forum.
Hope that helps!
The Salvation Prophecy
Space Combat. Planet Exploration. Strategic Domination.
Space Combat. Planet Exploration. Strategic Domination.
Re: How to place child windows on top of listboxitem
Thank you very much!!!!!
But I don't really understand at this time.Do you mean that I first using ItemListbox, then add ListboxItem to it.But I can't place windows onto ListboxItem!Or I make something wrong.
I want to have a window, in this window, there are items like
----------------------------------Item1
----------------------------------Item2
----------------------------------Item3
and for each item, I want to place child windows on them, static image、static text and so on
Waiting for your answer to me!
But I don't really understand at this time.Do you mean that I first using ItemListbox, then add ListboxItem to it.But I can't place windows onto ListboxItem!Or I make something wrong.
I want to have a window, in this window, there are items like
----------------------------------Item1
----------------------------------Item2
----------------------------------Item3
and for each item, I want to place child windows on them, static image、static text and so on
Waiting for your answer to me!
Re: How to place child windows on top of listboxitem
The ItemListbox accepts ItemEntry objects. You should find your answer if you Search.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
Re: How to place child windows on top of listboxitem
First off, thank you for your reply!
I tried to define a class that inherit from ItemEntry, but When I run my application, it get assertion that say I should implement the getItemPixelSize member function of ItemEntryWindowRenderer, which makes me fuzzy.I've taken your advice and searched the forum, I can't find how to use the ItemListbox exactly!
Waiting for your help and I'll try to find it by myself too.
I tried to define a class that inherit from ItemEntry, but When I run my application, it get assertion that say I should implement the getItemPixelSize member function of ItemEntryWindowRenderer, which makes me fuzzy.I've taken your advice and searched the forum, I can't find how to use the ItemListbox exactly!
Waiting for your help and I'll try to find it by myself too.
Re: How to place child windows on top of listboxitem
I get the exception message again:
ItemEntry::getItemPixelSize - This function must be implemented by the window renderer module.
Why?what should I do then?
ItemEntry::getItemPixelSize - This function must be implemented by the window renderer module.
Why?what should I do then?
- Jabberwocky
- Quite a regular
- Posts: 86
- Joined: Wed Oct 31, 2007 18:16
- Location: Canada
- Contact:
Re: How to place child windows on top of listboxitem
Thank you!
I've gone through this topic you gave me, but I don't understand yet.What I need is a control that can handle many Items like ListboxItem and I can set the height of each item, also what I need is when I click on one of these items, it keeps the selected state(a selection brush).for each item, I can place child window on it.at this time, I want to put StaticImage、StaticText、StaticImage、StaticImage to it.
although you all give me some good advice!but I can't make me clear enough to follow you( )I'm not that experience!what's the easiest way to get the exact solution?If only you place some code here! , or explain it to me some more deep!
YOUNG Singbol.
I've gone through this topic you gave me, but I don't understand yet.What I need is a control that can handle many Items like ListboxItem and I can set the height of each item, also what I need is when I click on one of these items, it keeps the selected state(a selection brush).for each item, I can place child window on it.at this time, I want to put StaticImage、StaticText、StaticImage、StaticImage to it.
although you all give me some good advice!but I can't make me clear enough to follow you( )I'm not that experience!what's the easiest way to get the exact solution?If only you place some code here! , or explain it to me some more deep!
YOUNG Singbol.
- Jabberwocky
- Quite a regular
- Posts: 86
- Joined: Wed Oct 31, 2007 18:16
- Location: Canada
- Contact:
Re: How to place child windows on top of listboxitem
Sorry, that link is the best I could find for you. I don't have any specific code to give you.
I understand that this is one of the more complicated things to do in CEGUI version 0.6 and below.
I believe version 0.7 is going to make this much easier. You may want to wait for 0.7 to be stable and officially released, then use that.
I understand that this is one of the more complicated things to do in CEGUI version 0.6 and below.
I believe version 0.7 is going to make this much easier. You may want to wait for 0.7 to be stable and officially released, then use that.
Re: How to place child windows on top of listboxitem
Ok, Thank you all the same!
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: How to place child windows on top of listboxitem
When you use the ItemListbox as opposed to the normal listbox, the content is Window based (using ItemEntry based type windows). This means that these items - that are created like other windows, either via the CEGUI::WindowManager or in layout xml (the window type is for example, named "TaharezLook/ListboxItem") - can have other windows added to them, additionally they can be skinned via the looknfeel XML so can have a 'standard set' of embedded windows if so desired. I do not think there is any need here to create any new classes or anything, the existing implementation should do just fine - though you may decide you need to customise the WidgetLook XML definition a bit.
I understand that you're not experienced, and we'll all try and help where possible, though do note that it's not always possible for us to post full code examples
CE.
I understand that you're not experienced, and we'll all try and help where possible, though do note that it's not always possible for us to post full code examples
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: How to place child windows on top of listboxitem
Thank to CE,
I'm sorry that I post a new topic in the beginners help subforum.
But I can't wait to find the solution, pardon me!
And how to achive this?no new class?But what should I do then?I tried to create ItemEntry obj, but it gives me the exception who says "ItemEntry::getItemPixelSize must be implemented ..."
I'm sorry that I post a new topic in the beginners help subforum.
But I can't wait to find the solution, pardon me!
And how to achive this?no new class?But what should I do then?I tried to create ItemEntry obj, but it gives me the exception who says "ItemEntry::getItemPixelSize must be implemented ..."
Re: How to place child windows on top of listboxitem
Thx to CE and U all!I've solved this problem!
Re: How to place child windows on top of listboxitem
But What if I want add image to listboxitem?I want to give the listboxitem background image, too
Edit:And How about the items spacing, item between item.I want 0px or N px between each item.
Edit:And How about the items spacing, item between item.I want 0px or N px between each item.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: How to place child windows on top of listboxitem
You should be able to solve these issues by way of the WidgetLook definition for the ListboxItem in thelooknfeel. The background image would just be an ImageryComponent that draws the appropriate image, if you need to to be configurable, then you define a property as the source of the image. To add some space between the items, adjust the WidgetLook definitions so that the imagery for the item does not fill the entire space; since the bottom edges are currently specified as a scale value of 1, you can just add an offset value of -1 to give a pixel of spacing (obviously, this is just a little 'fake' since it's only visual. If you want a real physical space, you'll have to write your own listbox!)
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 10 guests