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

setSelectedIndex not scroll the selectedItem

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.7.1
    • Fix Version/s: 5.0.8
    • Component/s: Components
    • Labels:
      None

      Description

      <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>

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: