-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5042097
By: ansancle
I have multiple listbox's in a zul page. By overriding the following (per the style guide) I can change the background and text colors for a listbox. The issue I have is that I have many lists on this page and only want this change to apply to one of them. If I use the code below in either my .css file or in a <style> block in the .zul it will cause all the lists to have this style.
Is there a way to have only the list I want get this style and be able to have the others look a different way?
div.cell-inner
{
background: #A3A3A3;
color:#FFFFFF;
}
div.listbox-body
{
background: #A3A3A3;
color:#FFFFFF;
}
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5043126
By: waterbottle
You should set a sclass to your custom style class to listbox and add some style rule base on this style class following is the example :
<window title="listbox demo" border="normal"> <style> .mylist tr.item {
background: #A3A3A3;
color:#FFFFFF;
}
.mylist div.listbox-body
{
background: #A3A3A3;
color:#FFFFFF;
}
</style>
<vbox>
<listbox width="250px" sclass="listbox mylist">
<listhead sizable="true">
<listheader label="name" sort="auto"/>
<listheader label="gender" sort="auto"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
</listitem>
</listbox>
<listbox width="250px" >
<listhead sizable="true">
<listheader label="name" sort="auto"/>
<listheader label="gender" sort="auto"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
</listitem>
</listbox>
</vbox>
</window>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5043983
By: ansancle
Great, Thanks!
I was hunting around in some CSS docs trying to figure out exactly how to do what you showed.Works perfect.
Thanks again!!!
Andrew
thanks for this. its very usefull for me :)
Asked: 2008-06-19 14:58:54 +0800
Seen: 223 times
Last updated: Dec 23 '14