Results 1 to 5 of 5

Thread: listbox / textbox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 1999
    Location
    Ruinen, Drente, Netherlands
    Posts
    192
    How can I let show the record from a listbox in a textbox when I go tru the listbox with the up and down arrow keys ?

  2. #2
    Addicted Member
    Join Date
    Jun 1999
    Location
    Los Angeles
    Posts
    186
    Hi there, you just put the selected value of the listbox on the textfield in the click event of the listbox:

    Code:
    Private Sub List1_Click()
    Text1.Text = List1.Text
    End Sub
    Have a nice day
    André

  3. #3
    Lively Member
    Join Date
    Jul 2000
    Location
    Sydney, Australia
    Posts
    74
    to allow the arrow keys to also change the text box

    Private Sub List1_KeyUp(KeyCode As Integer, Shift As Integer)
    Text1.Text = List1.Text
    End Sub

    ' will change the contents of the text box when you let
    ' go of up or down arrow

  4. #4
    Addicted Member
    Join Date
    Jun 1999
    Location
    Los Angeles
    Posts
    186
    I agree, but with the click event your user can both use the arrows and the mouse from the same event!

    André

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 1999
    Location
    Ruinen, Drente, Netherlands
    Posts
    192
    thanks to you all !
    Both works fine
    regards, Kars

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width