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

    listview control que

    i use a listview control in report view that has 3 columns i set its labelwrap property to automatic so i can edit it at runtime by click. but now i can edit only the 1st column how can i edit the other 2?



  2. #2
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: listview control que

    The same problem I had when I first used ListView control. My workaround is to do manual editing.

    My ListView has 2 columns (ID and Description) and populated from a text file. I trapped the DOUBLE-CLICK event and request user to enter a new text via InputBox() function for the Description data (since they cannot change the ID).


    private sub ListView1_DblClick()
    if (ListView1.ListItems.Count = 0) then exit sub

    ' get the selected row
    dim oItem as ListItem
    set oItem = ListView1.SelectedItem

    oItem.SubItem(1) = InputBox("Description:", "Modify Descrption", oItem.SubItem(1))
    set oItem = nothing
    end sub




    Hope this helps,
    -Cool Bizs

    Good Luck,
    -Cool Bizs

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