-
FEATURED COMPONENTS
First time here? Check out the FAQ!
We need to have word-wrapped comboitems in a Combobox.
Code to reproduce:
<zk> <style> .z-combobox-rounded-pp, .z-bandbox-rounded-pp, .z-datebox-rounded-pp, .z-combobox-pp, .z-bandbox-pp, .z-datebox-pp { max-width:157px;} </style> <window border="normal"> <combobox> <comboitem label="A Very Long Text Which Should Be Broken Into Multiple Lines For Readability!" sclass="word-wrap" /> <comboitem label="Item2" sclass="word-wrap" /> <comboitem label="Item3" sclass="word-wrap" /> <comboitem label="Item4" sclass="word-wrap" /> <comboitem label="Item5" sclass="word-wrap" /> </combobox> </window> </zk>
We get horizontal scrollbar to view the first item as a whole.
But, we are looking a way to wrap the comboitems, hence no need of horizontal scrollbar.
Any help will be appreciated.
Thank you.
Thank you, Samchuang :)
I have achieved as follows:
<zk> <style> -combobox-rounded-pp .z-comboitem-text, .z-combobox-rounded-pp .z-comboitem-btn, .z-combobox-pp .z-comboitem-text, .z-combobox-pp .z-comboitem-btn { width:173px;word-wrap:break-word; max-width:120px;white-space:pre-line;} </style> <combobox width="185px"> <comboitem label="Simple and Rich" /> <comboitem label="The Long Line Which needs to break to Multi-Line!" /> <comboitem label="Thumbs Up!" /> </combobox> </zk>
Asked: 2010-04-22 05:45:51 +0800
Seen: 1,428 times
Last updated: May 03 '10