Results 1 to 4 of 4

Thread: Listview problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2018
    Location
    Athens
    Posts
    81

    Listview problem

    Hi,

    l have a listview control (no checkboxes) with several columns , say 5 and 12 rows .
    All subitems have some info in them .
    What l am trying to do and have not succeeded is
    By clicking a certain row , the item and subitems text to be copied in 5 textboxes l have outside the listview

    Thanks for feedback

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,336

    Re: Listview problem

    Not enough information. Post the relevant code for example.

  3. #3
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    2,511

    Re: Listview problem

    Quote Originally Posted by Peter Swinkels View Post
    Not enough information. Post the relevant code for example.
    Huh? How is that not enough?
    One of the easiest things to do with a ListView

    IIRC, the Property of ListView.SelectedItem returns the Item for the currently selected item/row (Don't start with Multiselect!) (MyListView.SelectedItem Is Not Nothing)
    (At least it's that way in Office/VBA, there is probably either the same property or something along those lines in vb6)
    Then it's just an easy

    Text1.Text = MyListView.SelectedItem.Text
    Text2.Text = MyListView.SelectedItem.ListSubItems(1).Text
    etc....
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  4. #4
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,514

    Re: Listview problem

    Huh, seems to be the same question as this thread:
    https://www.vbforums.com/showthread....=1#post5518644

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