ScrollPane : No way to know if a scroll bar is visible

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 7-pool
    • Component/s: javafx

      It should be very helpful to know if a scroll bar within a scroll pane is visible or not.
      In my case, I want to add 1 pixel gap between the scroll pane content and the scroll bar (See attached screen shot).
      To do this, I need to dynamically add/remove css rules :

      .scrollBarVisible {
          /* Add 1 pixel gap between the ScrollPane content and the ScrollPane scroll bar when the scroll bar is visible */
          -fx-padding: 0 1 0 0;
      }

      .scrollBarNotVisible {
          /* Remove 1 pixel gap between the ScrollPane content and the ScrollPane scroll bar when the scroll bar is _not_ visible */
          -fx-padding: 0;
      }

      A pseudo-calss would allow something like :
      .scroll-bar {
          -fx-padding: 0;
      }
      .scroll-bar:visible {
          -fx-padding: 0 1 0 0;
      }

            Assignee:
            Unassigned
            Reporter:
            Sandra Lions-piron
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: