CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2001
    Posts
    28

    Listview control

    Hi,

    I'm using listview control on my form.

    But by default it is selecting first element.

    When user selectes the item then only it has to select item.

    I checked with
    ListView.ListItems(I).Selected = True

    How to solve this

    Thanks,
    Anita


  2. #2
    Join Date
    May 2001
    Posts
    36

    Re: Listview control

    Change the focus from the list view




  3. #3
    Join Date
    Jul 2000
    Location
    india
    Posts
    49

    Re: Listview control

    Try this
    Set ListView.SelectedItem=Nothing


  4. #4
    Join Date
    Jun 2001
    Posts
    28

    Re: Listview control

    Hi Raghu,

    That is not working.

    Any other suggestion?

    Thanks
    Anita


  5. #5
    Join Date
    Jun 2001
    Posts
    28

    Re: Listview control

    Hi Greenu,

    That is not working.

    Any other suggestion?

    Thanks
    Anita


  6. #6
    Join Date
    May 2001
    Location
    Canada
    Posts
    182

    Re: Listview control

    Add the following code in Form_Load, just after you added all listitems into the listview.

    ========
    ListView.SelectedItem.Selected = False
    =========


    Regards,

    Michi

  7. #7
    Join Date
    Jun 2001
    Posts
    28

    Re: Listview control

    Perfect!!!!

    Thanks,
    Anita


  8. #8
    Join Date
    May 2001
    Posts
    36

    Re: Listview control

    please check the option hide selection in the properties of the list view.Then try changing the focus


  9. #9
    Join Date
    May 2001
    Posts
    36

    Re: Listview control

    The option given by Michi works good ...




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

Featured