Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DirListBox

Status
Not open for further replies.

pkailas

Programmer
Joined
Jun 10, 2002
Messages
555
Location
US
I've made a DirListBox to brose file folders, but it doesn't seem to let me press Enter on the key board to switch folders. I can double click ok, but why doen't the enter key work? If I hit the first letter in the name of a folder it will jump to those folders. Any one know what's up?
 
In a DirListBox the doubleclick just call the Dir1_Change event.
To make the Enter Key do the same just catch the Keypress event, look for Enter key, and call the Dir1_Change event.

Something like this should do (note no error checking etc)
Code:
Private Sub Dir1_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
    Call Dir1_Change
  End If
End Sub
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top