vbMarkO Posted August 27, 2006 Posted August 27, 2006 I have a combox NOTE; It is a toolStripCombox called tscStubDates I want to select an item then hit enter and it fire the code I have which will display records from an xml file I have. Note, I already have it where I use the click event.... but I want to select an item then be able to scroll through using hte arrow keys then when I get to the date of a specific record fire that event by hitting the enter key How do I do this? vbMarkO Quote Visual Basic 2008 Express Edition!
Cags Posted August 27, 2006 Posted August 27, 2006 If the item has key events then you can use the following. If it doesn't things will be a little more tricky. ' in key down event If e.KeyCode = Keys.Return Then ' do something End IfIf this isn't possible you could try setting the KeyPreview property of the form to true and using the forms key events, you will just have to try and check if the combobox has focus first. I can't really be much more specific as I'm using 2003 and so don't have a toolstrip control. Quote Anybody looking for a graduate programmer (Midlands, England)?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.