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

[GridPane] Let the user show and hide rows and columns

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u60
    • javafx
    • None

      We have different forms in our application. We use GridPane to place the labels on the left side and to place the controls on the right side. Everything is arranged nicely.

      But now we want to hide some rows under certain circumstances (e.g. no password-input is necessary). This is currently impossible with the GridPane. We have to dynamically remove and add Nodes and switch their row-index using GridPane.setConstraints(Node, int, int). But this is not very straightforward and produces a lot of ugly und difficult maintainable code.

      I know that there is no real "Row or Column Model" in the GridPane. But maybe there is a solution by using static methods like that used above:
        GridPane.showRow(GridPane, int)
        GridPane.hideRow(GridPane, int)
        GridPane.showColumn(GridPane, int)
        GridPane.hideColumn(GridPane, int)
      Another solution would maybe to extend RowConstraints and ColumnConstraints with a "showing" attribute.

            Unassigned Unassigned
            aliebelt Andreas Liebelt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: