-
FEATURED COMPONENTS
First time here? Check out the FAQ!
How to change the disabled text color of textbox field?
My code:
<window border="normal"> <style> .z-textbox-disd { color: red; } </style> <textbox disabled="true" text="dafdsa" /> </window>
The above code doesn't works.
Thanks.
This works:
<style> .z-textbox { color: red; } </style> <textbox readonly="true" text="dafdsa" />
But, this doesn't:
<style> .z-textbox { color: red; } </style> <textbox disabled="true" text="dafdsa" />
Any way of setting text color for disabled field?
Thanks.
The following code works in firefox-3.6.4 but not in IE-7:
<textbox disabled="true" text="dafdsa" style="color: #FF0000 !important;" />
My Work Environment:
zk-bin-5.0.1
Eclipse Java EE IDE for Web Developers.
ZK Studio Version: 0.9.6
Any work around available for this?
Thanks.
I need the same for a disabled Datebox. The default color is gray on white background ??????? I need a good readable black on white.
Please have a look on this comp too.
Thanks
Stephan
You have to specify !important (Please take a look at CSS source code). For example,
<zk>
<style>
.z-textbox { color: red; }
.z-textbox-disd, .z-textbox-disd * { color: green !important;}
</style>
<textbox text="dafdsa" />
<textbox disabled="true" text="dafdsa" />
</zk>
However, we cannot really change the font color of disabled textbox (INPUT) in IE.
For example, you can create a plain HTML page as follows and try with IE:
<html>
<body>
<input style="color:red" disabled value="foo"></input>
</body>
</html>
Thanks Tom,
!important works for me.
best
Stephan
Thanks Tom :)
You are correct, the html sample page proved IE has problem.
Thank you for your clarification.
Sorry,
Why some change on 'z-textbox-text-disd' doesn't work in IE8,
I need to change this style, because I made some classes that extended Textbox in my app, and I can't use parts of code of html in all zul pages.
Are there some solutions for this point?
Thanks, and sorry for my bad English.
Have you specified the keyword !important?
I resolved my problem. I modified the value of opacity attribute,
filter: alpha(opacity=60);
to
filter: alpha(opacity=100);
because, the text is hard for read.
thx all.
I added in global css.
.z-textbox-disd, .z-decimalbox-disd, .z-intbox-disd, .z-longbox-disd, .z-doublebox-disd {
opacity: 1;
color: black !important;
background-color: #FFFFFF;
}
This works nice in firefox but doesn't work in IE8.0. Is there anyone who has workaround to make it more readable?
Please try
<HTML>
<HEAD>
<style type="text/css">
.disabled {
background-color: #FFFFFF;
}
</style>
</HEAD>
<BODY>
<input type="text" disabled class="disabled" value="Disabled">
</BODY>
</HTML>
This is acceptable, but seems that IE can't display the zk textbox with opacity = 1.
Asked: 2009-10-10 12:21:34 +0800
Seen: 6,564 times
Last updated: Aug 16 '12