Page up/down in combo box

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Reiko
Posts: 105
Joined: Sun Aug 16, 2009 7:06 am
Location: Australia

Page up/down in combo box

Post by Reiko »

I'm not sure if this is intended or not, but the behaviour is a little weird.

When you click to open up a combo box, then use the page up/down keys, it will cycle through a page at a time. But if you have the combo box focused (without the list open) and use page up/down, it only changes between the first and last item in the list, instead of increments of 6 (or whatever). I would see this behaviour as more suited for the home and end keys, rather than page up and down.
Reiko
Posts: 105
Joined: Sun Aug 16, 2009 7:06 am
Location: Australia

Re: Page up/down in combo box

Post by Reiko »

Just got reminded of something else. This has been in there for as long as I've used irrlicht but was never sure if it was my bug or irrlicht's bug.

When scrolling the mouse wheel on a combo box (with the list closed) fast, or holding down the down or up arrow key, sometimes the last "combo box changed" event isn't fired. Like I wrote a model viewer program for a game, say the combo box contains a list of weapons. If you scroll through the list of weapons quickly, sometimes the weapon model that actually gets loaded is the one previous to the one currently selected in the combo box. If you were scrolling down, it would load the one before, or scrolling up it would load the one after the selected one. So the weapon you see would be different to the one written in the combo box.

So what I ended up doing with my program was instead of using the combo box changed event, I now check the current selection of the combo box every frame and see the data for that selection (which is an id for the item) matches the id of the currently loaded model (stored elsewhere) and if they differ, it loads the model that is selected. This is the unfavourable way to do it but is what I found to be bug free.

Maybe more than one event is being fired per frame and so only the first one gets through, or something like that.
Post Reply