dcsimg
Results 1 to 5 of 5

Thread: Strange ListView Effect

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2008
    Posts
    46

    Strange ListView Effect

    I have a ListView with one row in it

    When I set the Enabled property of a listview to False, all the column headers disappear, and the number 177 appears in the top left corner of the control. 177 is the key of the one record that is in the ListView. The first column's width is 0 to hide the key.

    The control is not bound and is loaded from code.

    It happens as soon as I set

    Code:
    lvLabor.Enabled = False
    This is weird. Anyone have any idea what's going on here?
    Last edited by Zephaneas; Sep 15th, 2017 at 02:52 PM.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    18,234

    Re: Strange ListView Effect

    Is this a standard listview or a custom usercontrol? Is there any subclassing going on?

    Yes, that does sound weird. If you add another listview on the form, add 1 record, and do the same, does the behavior continue?
    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}

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2008
    Posts
    46

    Re: Strange ListView Effect

    Standard Listview. No subclassing

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2008
    Posts
    46

    Re: Strange ListView Effect

    This fixed it

    Code:
    lvLabor.Visible = False
    lvLabor.Enabled = Not IsEnabledState
    lvLabor.Visible = True
    Toggle visible on/off

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    18,234

    Re: Strange ListView Effect

    If you make the column width > 0, does it happen? I think everyone may be tossing stuff at the wall to see if it sticks. Be curious if someone chimes in and says, "Yeah, I've seen that before..."

    Edited. I see you resolved it.
    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
  •  



Featured


Click Here to Expand Forum to Full Width