Is there a way to set ListView Disabled Color?

rgately

Member
Licensed User
Longtime User
Is there a way to specify what color the listview will be when it is disabled? For example: If the listview is temporarily disabled to prevent users from making a selection then there should be a visual indication showing that the listview is disabled. Same as how a button looks when its disabled.

My listview has a transparent background and the text is white. Ideally, I'd like the text to turn gray when the listview is disabled.

If there isn't a way to determine the listview disabled color then I'll probably just toggle the visible property instead.
 

rgately

Member
Licensed User
Longtime User
Thanks for your effort! When I tried your code, the only portion of the listview that did change color was the backcolor. The text color remained the same (white) and that's what I was trying to change. At first, I wasn't sure if the text color had changed (white to gray) so I changed your code to "red" and still did not see any change in text color. From what I've read, it's not possible to change the text color after the listview has been populated. But there appears not to be a way to predefine the disabled color as you can define with buttons.

I have altered my design so that I do not need to rely upon the appearance of the listview, to know if its enabled or not.

If your code truly changes the text color then let me know that I've missed something. Otherwise, its not too important now that I've worked around it.

Thanks again.
 
Upvote 0
Top