Results 1 to 7 of 7

Thread: [RESOLVED] Blue Highlighting?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    93

    Resolved [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:
    1. Dim i As Long
    2. For i = 0 To List1.ListCount - 1
    3.     List1.Selected(i) = True
    4. 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.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    93

    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.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.
    Quote 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?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    93

    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,

  6. #6
    Addicted Member sigid's Avatar
    Join Date
    May 2006
    Location
    Massachusetts, USA
    Posts
    182

    Re: Blue Highlighting?

    SteveVB6 - after you set the selected status to true or false, set the ListIndex to -1.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    93

    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
  •  



Click Here to Expand Forum to Full Width