CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    445

    No grid lines in a disabled list control??

    Hi all,

    I have a list control with LVS_REPORT & LVS_EX_GRIDLINES style.

    My problem is that when the list control is disabled the grid lines disapear.

    Anyone know how to "keep" the grid lines even when the control is disabled?

    Thank you!!

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: No grid lines in a disabled list control??

    Does it also happen for the standard Windows (no themes) style?
    (Sorry, I use grid lines in list control very seldom, and I never tried to disable my list controls, so I don't know how it works)
    Victor Nijegorodov

  3. #3
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: No grid lines in a disabled list control??

    I don't commonly use grid lines in and disabling of list controls either, and in fact never have used both on the same list control. However, my suspicion is that your grid lines aren't actually gone. It's rather that the default background color of a disabled list control is the default control background color, which happens to be the same as the default grid line color, effectively making the grid lines invisible when the list control gets disabled. So, unless I'm mistaken, one possible solution for you is to simply change the grid line color.
    Last edited by Eri523; September 3rd, 2012 at 06:27 PM.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

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