Revision history [back]

click to hide/show revision 1
initial version

answered 2011-05-11 01:55:13 +0800

TonyQ gravatar image TonyQ

https://www.masterbranch....

ok , got your point , the thing you really care is actually the visible items, sorry for misunderstanding your question.

I have to say , currently it's not supported yet by ZK, you could do some overwrite in client side , but it's not recommended , since it might break after you got newer update in future.

Or you could wait ZK to build it to future version , you could follow the feature request : https://sourceforge.net/tracker/?group_id=152762&atid=785194

The client side way will not get ANY WARRANTY and might break after next version.

<combobox xmlns:w="client">

    <attribute w:name="_fixsz"><![CDATA[
    function (ppofs) {
        var maxheight = 200; // config it here , it's pixels that show up , 
                                                   // it's hard to know the item height and show it now , currently you could only set the height for popup .
        var minheight = 10; 
        this.$_fixsz(ppofs);
        var pp = this.getPopupNode_();
        if (!pp) return;

        if (ppofs[1] == "auto" && (pp.offsetHeight > maxheight || pp.offsetHeight > 349)) {
            pp.style.height = jq.px(maxheight);
        } else if (pp.offsetHeight < minheight  || pp.offsetHeight < 30) {
            pp.style.height = jq.px(minheight); //minimal
        }
    }
    ]]></attribute>
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
    <comboitem label="Simple and Rich" />
    <comboitem label="Cool!" />
    <comboitem label="Thumbs Up!" />
</combobox>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More