Results 1 to 40 of 4215

Thread: CommonControls (Replacement of the MS common controls)

Threaded View

  1. #11
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    The fix as you suggested is OK. However, I would like to replicate the problem to look for another potential issue.
    But I couldn't replicate. Can you bundle a small demo?
    I used your demo in post #1. I added 2 new test buttons with code below. Note. Setting .Redraw=False also prevents the error.
    Code:
    ' button to remove listitems & column headers
    Dim n&
    ListView1.ListItems.Clear
    For n = ListView1.ColumnHeaders.Count To 2 Step -1
        ListView1.ColumnHeaders.Remove n
    Next
    
    ' button to re-add columns & errors
    ListView1.ColumnHeaders.Add , , "NewCol"
    ListView1.ColumnHeaders.Add , , "NewCol2"
    The MS ListView behaves exactly the same. So I do not consider this being a "bug". Thanks however for your testing.
    Wow, never really noticed. I was assuming it would react similar to deleting a column from an Excel sheet. But v6 of the Listview doesn't shift column contents when headers are removed. I should've been using the .ListSubItems.Remove method of each listview item to produce the results I expected. With old age no longer creeping up, it has settled in, wonder if this is something I re-learned?
    Last edited by LaVolpe; May 17th, 2020 at 10:52 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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