Jump to content
  • Advertisement
Sign in to follow this  
viper110110

Stop using arrow keys on ListBox

This topic is 2587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a ListBox and another custom control on my winform. In the custom control (using XNA) I use the arrow keys to move my level around. The ListBox holds a list of all levels. The issue is that, once a level has been selected in the list and it appears in the custom control, when I try to move it around with the arrow keys, I also end up selecting a new level in the ListBox. Is there a way I can stop it from recieving keyboard input or another way I can work around this issue?

Share this post


Link to post
Share on other sites
Advertisement
Should just be a matter of moving input focus from the listbox to your custom control. How are you processing input of the arrow keys? It sounds like you might be inadvertently doing something like handling all input and ignoring focus, which would line up with the symptoms you describe.

Share this post


Link to post
Share on other sites
Yes, that looks like exactly what I am doing. I process the input with XNA's classes and completely ignore focus. This is ok for my program. I am just stuck on how to take focus away from one control and give it to another. I don't ever really want to use the arrow keys on the listbox, so if I could take away control permanently that would be fine too.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!