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

ScrollPane: controlling scroll position programmatically

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.0
    • javafx

      I need to scroll so that a specific descendant of ScrollPane.getNode() is displayed at a specific location.
      I guess using ScrollPane.setHValue() and ScrollPane.setVvalue() and some coordinate calculation/conversion, I should be able to do it. However I wonder if it would not make sense to have something like:

      void ScrollPane.scrollToNode(Node node);
      // Scroll so that node is on the center (corner?) of the ScrollPane
      // "node" must be a descendent of ScrollPane.getNode()

      Using a node for targetting a scroll position seems to be very 'FX like' to me.

            Unassigned Unassigned
            eleponn Eric Le Ponner
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: