This discussion is archived
1 Reply Latest reply: Nov 16, 2012 2:29 AM by daniel RSS

How to get number of cols and rows of gridPane?

user13335782 Newbie
Currently Being Moderated
How to get number of cols and rows of gridPane?
  • 1. Re: How to get number of cols and rows of gridPane?
    daniel Journeyer
    Currently Being Moderated
    Hi,

    This is what we use in SceneBuilder:
    #rows = Max (gridpane.getRowConstraints().size(), 
                         Max[for node n in gridpane.getChildren()](
                               Max(0, GridPane.getRowIndex(n)) + Max(1, GridPane.getRowSpan(n))
                         )
                  )
    -- daniel

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points