Results 1 to 9 of 9

Thread: Highlight

  1. #1

    Thread Starter
    Hyperactive Member Janaka's Avatar
    Join Date
    Nov 2001
    Posts
    277

    Highlight

    In a listview how do we highlight a item in the list

  2. #2
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    Click on it?



    Thourgh code:
    List1.ListItems(3).Selected = True (or something similar)
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  3. #3

    Thread Starter
    Hyperactive Member Janaka's Avatar
    Join Date
    Nov 2001
    Posts
    277
    need to show the first item highlighted with out clicking
    say when u add a new item to the list

  4. #4
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    List1.ListItems(0).Selected = True

    ?
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  5. #5

    Thread Starter
    Hyperactive Member Janaka's Avatar
    Join Date
    Nov 2001
    Posts
    277
    It is not working
    I have a listview with sub items though...

  6. #6
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    Oh, a listVIEW, OK.
    Try...

    ListView1.Item(0).Selected = True
    or something like that.

    ?
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  7. #7

    Thread Starter
    Hyperactive Member Janaka's Avatar
    Join Date
    Nov 2001
    Posts
    277
    i did this and it works
    VB Code:
    1. lvwCateories.ListItems(1).Selected = True
    2.     lvwCateories_Click

    but the problem is the first item is not highlighted...
    Last edited by Janaka; May 6th, 2002 at 12:01 AM.

  8. #8

    Thread Starter
    Hyperactive Member Janaka's Avatar
    Join Date
    Nov 2001
    Posts
    277
    *bump*

  9. #9
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The ListItems array is probably zero based then try:
    VB Code:
    1. lvwCateories.ListItems(0).Selected = True

    Also make sure in the properties that HideSelection is set to False or unchecked.

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