0

Combobox autodrop option doesn´t scroll view into matched item.

asked 2015-04-22 11:15:10 +0800

claudioveryant gravatar image claudioveryant
9 1

Combobox with autodrop="true" and no initial value selected.

When I type a value that is at the bottom of the list:
- using ZK-7 or ZK-6.5.7 combobox don´t scroll to see the matching value;
- instead using ZK-3.6.4 work well and the list scroll to see the matching value.

Run the following sample and typing "4" in the combobox:

<zk>
<combobox autodrop="true" >
      <comboitem label="a" />
      <comboitem label="b" />
      <comboitem label="c" />
      <comboitem label="d" />
      <comboitem label="e" />
      <comboitem label="f" />
      <comboitem label="g" />
      <comboitem label="h" />
      <comboitem label="i" />
      <comboitem label="l" />
      <comboitem label="m" />
      <comboitem label="n" />
      <comboitem label="o" />
      <comboitem label="p" />
      <comboitem label="q" />
      <comboitem label="r" />
      <comboitem label="s" />
      <comboitem label="t" />
      <comboitem label="u" />
      <comboitem label="v" />
      <comboitem label="x" />
      <comboitem label="y" />
      <comboitem label="z" />
      <comboitem label="A" />
      <comboitem label="B" />
      <comboitem label="C" />
      <comboitem label="D" />
      <comboitem label="E" />
      <comboitem label="F" />
      <comboitem label="G" />
      <comboitem label="H" />
      <comboitem label="I" />
      <comboitem label="L" />
      <comboitem label="M" />
      <comboitem label="N" />
      <comboitem label="O" />
      <comboitem label="P" />
      <comboitem label="Q" />
      <comboitem label="1" />
      <comboitem label="2" />
      <comboitem label="3" />
      <comboitem label="4" />
      <comboitem label="5" />
      <comboitem label="6" />
      <comboitem label="7" />
      <comboitem label="8" />
</combobox>
</zk>

Note:

  • the browser is Firefox 37.0.1
  • ZK-3.6.4 is "zk_ver='3.6.4' zk.build='10031815'"
  • ZK-6.5.7 is "ZK 6.5.7.1 EE 2014110516"
  • ZK-7 is "ZK 7.0.3.2 EE 2014110510"
delete flag offensive retag edit

2 Answers

Sort by » oldest newest most voted
1

answered 2015-04-23 03:35:26 +0800

echarish gravatar image echarish flag of Japan
1809 7
http://jp.linkedin.com/in...

Hello

Try setting your list model on the fly rather than hard coding them that way you will get the desired result.

 <combobox autodrop="true" id="combo"/>


 <zscript>
String[] _dict = { 
            "A","B","C","D","E","F","G","H","I","J","K","L","M","N",
            "O","P","Q","R","S","T","U","V","a","b","c","d","e","f",
            "g","h","i","j","k","l","m","n","o","p","q","r","s","t",
            "u","v","1","2","3","4","5","6","7","8","9",        
};
 ListModel dictModel= new SimpleListModel(_dict);
 combo.setModel(dictModel);
</zscript>
link publish delete flag offensive edit
0

answered 2015-04-23 09:20:45 +0800

claudioveryant gravatar image claudioveryant
9 1

updated 2015-04-23 09:21:21 +0800

Thanks echarish, your sample work well but I can to see the only item selected so how drops down the list of combo items to see also the other items like ZK3.6.4?

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-04-22 11:15:10 +0800

Seen: 17 times

Last updated: Apr 23 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More