Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Visual Basic 2008 Express Edition!
Posted

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 If

If 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.

Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...