Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-56

setSelectedIndex not scroll the selectedItem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.8
    • 5.0.7.1
    • Components
    • None

      <zk>
      <div>
      setSelectedIndex not scroll the selectedItem in onCreate of afterCompose, but work in au
      </div>
      <hlayout>
      <button label="select1" onClick="listbox.setSelectedIndex(200);" />
      <button label="select2" onClick="listbox.setSelectedIndex(400);" />
      <button label="select3" onClick="listbox.setSelectedIndex(600);" />
      </hlayout>
      <listbox id="listbox" width="300px" height="300px" onCreate="listbox.setSelectedIndex(500);"></listbox>

      <zscript><![CDATA[
      List list = new ArrayList();
      for (int i = 0; i < 1000; i++)

      { list.add("item_" + i); }

      ListModelList model = new ListModelList(list);
      listbox.setModel(model);
      ]]></zscript>

      </zk>

            SimonPai SimonPai
            dennis dennis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: