Seems to be caused by the components themselves reporting their own size as 
wrong.. I thought they would report the width and height of the space 
availale to them based on the layout theyre added to.

On Friday, October 4, 2019 at 5:48:52 PM UTC+1, Gareth Murfin wrote:
>
> So I have a grid layout 2x2, and if I add buttons, they stack as expected. 
> For example
>
> myGrid.add(new Button("AAA"));
> myGrid.add(new Button("AAA"));
> myGrid.add(new Button("AAA"));
> myGrid.add(new Button("AAA"));
>
> Adds 4 buttons which sit in each of the cells as expected.
>
> But when I try this with my own custom component (with its own canvas) 
> then they dont stack into each cell, they seem to paint over the top of 
> each other.  ie if I add 4, they all sit in cell 0,0 (painting over the top 
> of each other) which is weird, because I have done this before and it did 
> work perfectly. But I cant work out why.. Hopefully that is explained 
> properly, any ideas what I am doing wrong?
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/dbf9530b-6954-430e-9c5b-63a3c64a18f4%40googlegroups.com.

Reply via email to