How to change textbox focus color?
I am using diffrent colored textboxes. Example dark violet, but keyboard focus is black. This is bad combination. How i can change textbox focus to gain more visual contrast?
How to change textbox focus color?
I am using diffrent colored textboxes. Example dark violet, but keyboard focus is black. This is bad combination. How i can change textbox focus to gain more visual contrast?
A presume you're working in WPF, so try setting the FocusVisualStyle-property.
More information about this can be found at: http://msdn.microsoft.com/en-us/library/bb613567.aspx
If for web with javascript you can do something similar to the following
Javascript
function DoBlur(fld)
{
fld.className='normalfld';
}
function DoFocus(fld)
{
fld.className = 'focusfld';
}
Your CSS would have the following
.normalfld
{
background-color: #FFFFFF;
}
.focusfld
{
background-color: #FFFFCC;
}
and for your text box
then your text box will have the OnFocus and OnBlur events wired up.
<input type="text" onblur="DoBlur(this);" onfocus="DoFocus(this);" />