Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: namida on February 25, 2018, 01:29:11 AM

Title: [FIXED][BUG][FLEXI] Navigating sprites dropdown with arrow keys doesn't update display
Post by: namida on February 25, 2018, 01:29:11 AM
Steps to reproduce:
1. Go to the Sprites tab
2. Select something in the dropdown box used to select sprites
3. Use the Up and Down arrows to select a different option

Expected: Graphic shown changes to correspond to the new selection
Actual result: Nothing changes, except the selected item name
Title: Re: [BUG][FLEXI] Navigating sprites dropdown with arrow keys doesn't update display
Post by: namida on March 19, 2018, 11:09:14 PM
There are also somewhat weird effects when doing this in other dropdown boxes (eg. scroller texts) too.

I don't know exactly how forms work in C#. In Delphi, you get bugs similar to this if you rely on the OnClick / OnChange event handling; the OnSelectionChange event should be used instead to properly handle this case (it even handles cases where the selection is changed by other code, though in this case it passes a boolean value that indicates the change was not performed by the user).
Title: Re: [BUG][FLEXI] Navigating sprites dropdown with arrow keys doesn't update display
Post by: Nepster on March 20, 2018, 04:48:14 PM
Well, I am already using the OnSelectionChange event. However in C# it only triggers when you do a double click or press return or such. :P
I will see what can be done...
Title: Re: [BUG][FLEXI] Navigating sprites dropdown with arrow keys doesn't update display
Post by: Nepster on March 21, 2018, 06:44:01 PM
Ok, managed to improve this behavior now.