|
-
Sep 17th, 2003, 07:17 PM
#1
Thread Starter
Lively Member
[RESOLVED] ListView, selecting via code?
After I fill my listview control, I want to automatically select the first entry, which I do via:
Code:
lstRoster.ListItems.Item(1).Selected = True
Call lstRoster_ItemClick(lstRoster.ListItems.Item(1))
but the item isn't actually selected, how do I do that?
Last edited by thetakerfan; Sep 18th, 2003 at 05:16 PM.
-
Sep 17th, 2003, 08:10 PM
#2
Fanatic Member
try
set lvw.selecteditem = lvw.listitems(0)
dunno if it would work
-
Sep 17th, 2003, 10:59 PM
#3
Thread Starter
Lively Member
Nope, same thing.
It calls the ItemClick routine, but it isn't highlighted
-
Sep 17th, 2003, 11:26 PM
#4
Fanatic Member
umm how about lvwFeatures.ListItems(0).Selected = True
other than that, i giveup!
-
Sep 18th, 2003, 05:15 PM
#5
Thread Starter
Lively Member
Thanks for the help. It turned out being that I had HideSelection to True, and the form was getting focus after I set the selection, so the highlight went away. Problem solved, thanks again.
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
|