Automatic reflow isn't a performance killer when correctly done (see 
Flutter and React), but it is another discussion ;)
As for the usage of FlowLayout, it is the default layout used when you 
create a Container without providing a specific layout. I used it as my 
parent container contains only one child and I just wanted a parent 
container that defined some specific margin and padding for its provided 
child component content (so I didn't bother speciying a Layout as with only 
one child, every layout pretty much have the same behaviour). 
Anyway, that doesn't explain why the scroll is bugged when the parent has a 
FlowLayout (if components can be defined as scrollable only when all 
parents components use a BorderLayout, this is a serious drawback. The 
scrollability of a component should not depend on the layout used by some 
of its parents)

On Thursday, October 11, 2018 at 6:28:50 AM UTC+2, Shai Almog wrote:

> We strongly recommend avoiding the nesting of flow layouts. You should use 
> BoxLayout.X or any other alternative.
> The problem is that we don't reflow. Reflow is a performance killer and 
> source of even worse odd, bugs. 
>
> FlowLayout provides a preferred size which is a wild guess because it 
> can't tell the final width at that stage so it doesn't know the height. If 
> you nest them it becomes even worse because of the line break 
> functionality. FlowLayout works OK for relatively simple base components 
> but nesting into it is a recipe for trouble.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/985bef61-b530-4663-bb66-ba4064ab9899%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to