visual appearance litsbox readonly but disabled URGENT!
You could have one listbox component with with the following logic:
If made readonly:
--If is currently disabled:
----Add onhover styling to listbox.
Add background image styling.
Style text to black.
Add onClick listener.
If made disabled:
--If is currently readonly:
----Remove onClick listener
----Remove background image styling.
Style text to gray.
Remove onhover styling from listbox.
Is this what you want to do? If so, which part are you having difficulty with?
my problem is:
when i set as disabled a lisbox, combobox, etc. text appears very bad, gray color with shadow. i wanna the text color seems really black.
I tried with some other posts, but nothing happen.
Hi mhj...
I had the same problem, the text in disabled components is really illegible. You can achieve it rewriting the styles with the zclass property. It is simple with textboxes, decimalboxes... but with some components like comboboxes, listboxes... is a little more complex to do.
Good luck
that is exactly what happens to me, I do not understand how something that seems simple to solve turns out to be so complicated. I am waiting for help ....
Hi,
I'm not have the solution for listbox on the fly, but the attached code should help you to search on how you can modify the disabled color.
myCSS.css
. . .
/* ------------------- DATEBOX -------------------- */
/* Disabled datebox should have black font */
.z-datebox-disd,.z-datebox-text-disd,.z-datebox-rounded-disd,.z-datebox-rounded-text-disd
{
color: #000000 !important;
}
best
Stephan
thank you very much Stephan!
i will try with your code, if i can solve the problem i post the solution.
good, i found a post helped:
http://www.zkoss.org/forum/listComment/11928
now still i don't know how set text color in IE. I did a test in 9 version. with chrome stay very nice
.z-textbox-disd, .z-decimalbox-disd, .z-intbox-disd, .z-longbox-disd, .z-doublebox-disd {
color: black !important;
opacity: 1;
-moz-opacity: 1;
filter: alpha(opacity=100);
background:#F8F8F8 ;
}
.z-datebox-disd,.z-datebox-text-disd,.z-datebox-rounded-disd,.z-datebox-rounded-text-disd
{
color: black !important;
opacity: 1;
-moz-opacity: 1;
filter: alpha(opacity=100);
background:#F8F8F8 ;
}
.z-listbox-disd,.z-listbox-text-disd,.z-listbox-rounded-disd,.z-listbox-rounded-text-disd
{
color: black !important;
opacity: 1;
-moz-opacity: 1;
filter: alpha(opacity=100);
background:#F8F8F8 ;
}
.z-combobox-disd,.z-combobox-text-disd,.z-combobox-rounded-disd,.z-combobox-rounded-text-disd
{
color: black !important;
opacity: 1;
-moz-opacity: 1;
filter: alpha(opacity=100);
background:#F8F8F8 ;
}
Hi,
IE 9 had default style for disabled element, and there is no way to change the text color and shadow.
ZK - Open Source Ajax Java Framework
helo guys!
i need urgent listbox with visual appearance like readonly but disabled.
when readonly: has img in background and text is really black, not gray but items are selectables
when disabled: items are blocked but text is very bad (gray with shadow)
thanks in advance