ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

Change disabled textbox color to black in IE 8

schustf1
6 Feb 2012 08:44:49 GMT
6 Feb 2012 08:44:49 GMT

Hello all,

I tried to change the textbox color of a disabled textbox to black.
Browser is IE 8, ZK Version ZK 5.0.9 EE

I found this thread: http://www.zkoss.org/forum/listComment/9874, but it didn't solve the problem (see example code below). Is there a way to get black font color?

			<textbox value="Jerry" width="150px" disabled="true" style="color : black !important; font-weight : bold ; filter : alpha(opacity=100); opacity: 1"/>

Thanks, FS

benbai
9 Feb 2012 05:09:33 GMT
9 Feb 2012 05:09:33 GMT

Hi

It is an IE8 issue, please refer to the related thread on stackoverflow

Regards,
ben

DaniG
9 Feb 2012 10:57:52 GMT
9 Feb 2012 10:57:52 GMT

Hi schustf1...

I had the same problem because when a component is disabled color of the text makes it almost illegible. For simple components as Textbox, Intbox, Decimalbox... you could use the zclass property. I am using something similar to:

in my css page

.myTextbox {
	background-color: #FFFFFF;
	border: 1px solid #CCCCCC;
	color: #000000;
}

.myTextbox-disd {
	background-color: #EEEEEE;
	border: 1px solid #D1D1D1;
	color: #585858;
}

.myTextbox-focus, myTextbox-focus input {
	background-color: #EBFDDF;
	border-color: #748E3E;
	color: black;
}


...and in my zul page:

	<textbox zclass="myTextbox">


Hope it helps you.

Regards
Dani

schustf1
20 Feb 2012 16:19:23 GMT
20 Feb 2012 16:19:23 GMT

Hello Dani and benbai,

thanks for your help,

especially Dani, thanks for your style-info, was very helpful.