-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
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?
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
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
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.
Asked: 2012-01-21 00:41:13 +0800
Seen: 308 times
Last updated: Feb 06 '12