Click here to Skip to main content
15,887,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I know this should be easy. I mostly don't know what the brush is.

I want to make a Textbox (and some other UI elements like a ComboBox, DatePicker) to look as though they are disabled, but actually be enabled.

The reason I want to do this is we do not like the behavior of disabled. For example, no tooltips, no copy from etc.

I understand that this is the behavior and why. However our end users want it disabled but to be able to know what it is for (i.e. still need tooltips) and they want to 'grab' the active data (i.e. copy to buffer).
So essentially we just need to set the read only to true on the appropriate UI elements. However, then it looks enabled (I know.. I know... cause it is). So I need it to look disabled.

I want to style the brushes (text and background) to be that of the disabled. However I can't find the background brush for disabled, just the text brush.

http://msdn.microsoft.com/en-us/library/system.windows.systemcolors.graytextbrushkey.aspx[^]

Anybody know what it is?
Posted

1 solution

The background is just the color of whatever window the control is on. I assume you mean, for example, what would normally be the white area in an edit control, it turns to the containing window's background color when that control is disabled.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900