Search code examples
csszk

how to control over flow of list item in zkoss


Can any one guide me how to control overflow of list item. In code label "Operation Instruction" having a breaf instruction of a customer and i applied maxlength="40" when i restore down window then "Operation Instruction" shown two or more lines and i want it will be in single line only

<east id="eastcr" width="70%" autoscroll="true" visible="false" style="overflow:auto">
<groupbox>
    <caption label="Select Account"></caption>
    <separator></separator>
    <listbox id="lstbx" style="overflow:auto" mold="paging">
        <listhead id="lsthd" sizable="true" >          
        <listheader id="lsthd1" label="Sr No" align="center" width="5%" sort="auto"/>
        <listheader label="Account Number" align="center" width="15%" sort="auto"/>  
        <listheader label="Account Name" align="left" width="25%"  sort="auto" maxlength="20"/> 
        <listheader label="Operation Instruction" align="left" width="39%" sort="auto" maxlength="40"/>  
        </listhead>       
    </listbox>
</groupbox> </east>

Solution

  • Yo can use below style

    style="white-space: nowrap;"
    

    What it mean check below

    nowrap Sequences of whitespace will collapse into a single whitespace. Text will never wrap to the next line. The text continues on the same line until a
    tag is encountered