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

AnchorPane: removing anchors has no effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx23
    • javafx
    • None

      AnchorPane::set(Bottom,Left,Right,Top)Anchor method mentions that "Setting the value to null will remove the (anchor) constraint."

      The expectation is that clearing the anchor constraint should re-position the node to an un-anchored state, but the node remains in its anchored location.

      To reproduce:

      - run the attached code
      - click [Set Anchors] button
      - observe the node moving to the proper location and its properties updated (pane-XXX-anchor) (correct behavior)
      - click [Clear Anchors] button
      - observe properties cleared (correct behavior)
      - observe the node remaining in its anchored location (INCORRECT behavior)

        1. 0.initial state.png
          186 kB
          Andy Goryachev
        2. 1.anchors set.png
          194 kB
          Andy Goryachev
        3. 2.anchors removed.png
          188 kB
          Andy Goryachev
        4. AnchorPane_SetNull_8350809.java
          3 kB
          Andy Goryachev

            angorya Andy Goryachev
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: