0

visual appearance litsbox readonly but disabled URGENT!

asked 2012-01-21 00:41:13 +0800

mhj gravatar image mhj flag of Brazil
806 1 7

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

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2012-01-21 03:00:06 +0800

RichardL gravatar image RichardL
768 4

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?

link publish delete flag offensive edit

answered 2012-01-22 23:55:45 +0800

mhj gravatar image mhj flag of Brazil
806 1 7

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.

link publish delete flag offensive edit

answered 2012-01-23 09:24:03 +0800

DaniG gravatar image DaniG
78 1

updated 2012-01-23 09:28:16 +0800

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

link publish delete flag offensive edit

answered 2012-01-23 10:29:59 +0800

mhj gravatar image mhj flag of Brazil
806 1 7

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 ....

link publish delete flag offensive edit

answered 2012-01-23 12:28:18 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2012-01-23 12:30:30 +0800

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

link publish delete flag offensive edit

answered 2012-01-23 19:43:18 +0800

mhj gravatar image mhj flag of Brazil
806 1 7

thank you very much Stephan!
i will try with your code, if i can solve the problem i post the solution.

link publish delete flag offensive edit

answered 2012-01-24 01:09:53 +0800

mhj gravatar image mhj flag of Brazil
806 1 7

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 ;
  }

link publish delete flag offensive edit

answered 2012-02-06 06:49:48 +0800

vincentjian gravatar image vincentjian
2245 6

Hi,

IE 9 had default style for disabled element, and there is no way to change the text color and shadow.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-01-21 00:41:13 +0800

Seen: 308 times

Last updated: Feb 06 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More