|
-
Feb 2nd, 2007, 08:21 AM
#1
Thread Starter
Lively Member
[RESOLVED] Blue Highlighting?
hi, i am making a program that selects all items in a listbox with checkbox style. The problem is when i clcik the button, in one list 4 items stay highlighted at the bottom with blue, and the otherlist, all items in view stay highlighted with blue. It doesnt affect performance, but doesnt look very good. here is the code.
VB Code:
Dim i As Long
For i = 0 To List1.ListCount - 1
List1.Selected(i) = True
Next
both lists use the same code.
also how can i have the first item in the list have focus after that?
Last edited by stevevb6; Feb 2nd, 2007 at 08:31 AM.
-
Feb 2nd, 2007, 08:24 AM
#2
Re: removing item from list?
I'm confused.
Your thread title indicates you want to delete something from the list, but your post deals with highlighting.
What is your question?
-
Feb 2nd, 2007, 08:30 AM
#3
Thread Starter
Lively Member
Re: removing item from list?
oops, can you change that please, that was the problem i was dealing with when i started the thead, but the answer dawned on me, so i fixed it and was faced with this problem and just started to type without paying attention to that... sorry the question is the one i have asked. I fixed it.
-
Feb 2nd, 2007, 08:34 AM
#4
Re: Blue Highlighting?
Ok. 
If you select everything in a listbox, then everything in the listbox will be highlighted. If you remove the highlighting, then that item is no longer selected.
 Originally Posted by stevevb6
also how can i have the first item in the list have focus after that?
The answer is this: You can select the first item in the list, but that would mean the NONE of the other items would continue to be selected. Is this what you want?
-
Feb 2nd, 2007, 08:38 AM
#5
Thread Starter
Lively Member
Re: Blue Highlighting?
i use the checkbox style, and by selected i mean checked. its just when i check them all, some remain blue, but all are checked,
-
Feb 2nd, 2007, 10:08 AM
#6
Addicted Member
Re: Blue Highlighting?
SteveVB6 - after you set the selected status to true or false, set the ListIndex to -1.
-
Feb 2nd, 2007, 10:58 AM
#7
Thread Starter
Lively Member
Re: Blue Highlighting?
thank you! works perfect!
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
|