-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
Can anyone help me out to change the selection colour of a listitem in a list box. the code below doesn't work.
<style> div.z-listbox.testlistbox tr.z-list-item-seld , div.z-listbox.testlistbox tr.z-listitem-seld{ color : #80FF00; } div.z-listbox.testlistbox .z-list-item div.z-list-cell-cnt , div.z-listbox.testlistbox .z-listitem div.z-listcell-cnt{ color : #FF0000; } </style>
Give the full code.
Try this
<zk> <style> tr.z-listitem-seld { background-image:none ; background-color : #0080C0;} </style> <hbox> <zscript> classes = new String[] { "College", "Graduate" }; grades = new Object[] { new String[] { "Best", "Better" }, new String[] { "A++", "A+", "A" } }; </zscript> <listbox width="200px" forEach="${classes}"> <listhead> <listheader label="${each}" /> </listhead> <listitem label="${forEachStatus.previous.each}: ${each}" forEach="${grades[forEachStatus.index]}" /> </listbox> </hbox> </zk>
Before that, you have to make background image is none
i have 5 cent too. :-)
zk5
/* Selected rows in a listbox */ tr.seld,td.seld,tr.z-listitem-seld { background: #B8BFDC none repeat scroll 0 0; } /* Selected rows with the mouse hovering over them */ tr.overseld,td.overseld,tr.z-listitem-over-seld { background: #D3DBFC none repeat scroll 0 0; }
I have been fighting with listbox formatting also. I have a multiple select list box with check boxes. I would like the user to check a box and leave the background white. i.e. not use a selected color. I tried siva477's suggestion changing the color to white:
tr.z-listitem-seld {
background: #FFFFFF;
}
This works, but then the text disappears. It appears that the listbox expects the highlighting to a be a contrasting color and then displays the text in an inverse color. If tried adding explicitly setting the color like this but it doesn't work:
tr.z-listitem-seld {
background: #FFFFFF;
color: #000000;
}
I'd appreciate any suggestions.
John
check this
http://emrpms.blogspot.in/2012/04/list-item-with-crud-buttons.html
Asked: 2012-04-26 12:00:53 +0800
Seen: 571 times
Last updated: May 01 '12