I was looking for a way to to highlight a listbox item when the mouse pointer is over it.
I actually found a way to do so by using the following work-around:
- set the selection brush to hihlight my listbox item doing so: setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
- catch the mouse move event of the listbox
- in the mouse move function, find the item currently under the mouse pointer and select it manually
However there is one problem with this way of doing things: the method "getItemAtPoint" I would need from the listbox is currently protected.
So my question is:
Is there a better way to do what I am trying to? Or if not, would it be possible to set the method "getItemAtPoint" to public?
Thanks,
Rincevent
highlight a listbox item on mouse enter
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: highlight a listbox item on mouse enter
Is there a better way to do what I am trying to?
Probably not. You might be able to make use of ComboDropList, since it uses the behaviour that you desire, though I can't recall the implications of using this widget when it's not attached to a Combobox (IIRC, people have used it before as a standalone widget).
Or if not, would it be possible to set the method "getItemAtPoint" to public?
This request came up a few weeks ago in relation to the ComboDropList. We had some discussion about it, and decided making this happen is possible, though with a couple of small tweaks here and there. Ultimately the change did not get made, but I will add it to mantis and we'll make it so this time.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 12 guests