|
-
Sep 17th, 2000, 12:27 AM
#1
I have ordinary ListBox. I woulld like that the first choice is highlighted when the ListBox is initially displayed. I tried
List1.SetFocus
but it does not highlight the first choice. When I run th program, I have to press DownArrow on keyboard for the first choice to be highlighted. I tried sending down key during the form load:
SendKeys (DOWN)
but it has no effect in highlighting, even if the first entry is selected (I can just press (OK) and it takes the first entry)
With Combo box, I just have to set focus to have the Combo.Text highlighted in blue, but ListBox has no text property.
What I really want to do is that the first entry is highlighted on the list, so that the user can just press (OK) on form to choose this choice, or the user can click/use arrow keys to get to his choice and then press (OK).
What is so anoying is that I am sure it is some simple thing I am missing.
Thanks
-
Sep 17th, 2000, 12:32 AM
#2
Frenzied Member
Use the code:
List1.ListIndex = 0
-
Sep 17th, 2000, 12:41 AM
#3
Thanks, it works.
I knew it must have been a dead easy question.
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|