Ensemble / Group question

9 views
Skip to first unread message

Bene Volent

unread,
Dec 12, 2019, 6:05:34 PM12/12/19
to ScalaFX Users
At the end of this Ensemble file there is interesting comment about isolating from parent's layout parameters. As I am having Group challenges I am curious to understand: 
1)why would you need to do that and 
2)what does it mean to elements in the group when they are "isolated"?

This is the link, and the part I am referring is at the bottom of the source:


     // Wrap in a Group to isolate from parent's layout parameters
     
new Group {
       children
= flowPane
     
}


Jarek

unread,
Dec 14, 2019, 12:22:45 PM12/14/19
to ScalaFX Users

On Thursday, December 12, 2019 at 6:05:34 PM UTC-5, Bene Volent wrote:

     // Wrap in a Group to isolate from parent's layout parameters
     
new Group {
       children
= flowPane
     
}

Looks like a mistake/bug in the code. Wrapping the FlowPane in a Group prevents the flow layout from working as intended (when you resize the window the layout should change, the nodes should fill one row, anf flow to next one only of there is no enough space in that row) . The example is intended to illustrate the flow layout. I added an issue to be resolved in the Ensemble project. 

Thanks for pointing this out,

Jarek
Reply all
Reply to author
Forward
0 new messages