Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8094701

[ListView etc] scrollTo should do nothing if the item is already fully visible.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 9
    • 8u20
    • javafx
    • Windows 7 64-bit
      Java 8u20

      scrollTo(index) or scrollTo(item) will position the given index at the top of the ListView if possible, even if it was already showing in the middle.

      I have code where I want to make sure the currently selected item is visible if it is changed programmatically. If I use simple code that calls scrollTo when my model changes, it causes visual problems if the model was updated as a result of the user clicking on the ListView. (The item they clicked on snaps to the top of the view.)

            jgiles Jonathan Giles
            swpalmer Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: