Buttons in graphics 2.0 all positioned at 0,0 top left

Hi there,

I have just upgraded to graphics 2.0 and am having a problem.

My setup is that when the app loads I create a series of empty groups for different content to be displayed in. One of those groups contains all my buttons / interface elements.

Everything displays fine, except the buttons, which are all now positioned top left (at position 0,0).

These buttons are Widget 2.0 9-slice buttons.

If I don’t try positioning the buttons in one of the groups (i.e.: add them straight to the stage) then they are positioned correctly.

I have tried giving the groups anchor points, changing the anchorChildren property, but neither makes any difference.

Weirdly, buttons that I insert into a scrollView are positioned correctly.

Does anyone have any idea what I might be doing wrong? This all worked fine in graphics 1.0.

The issue occurs the same if I switch compatibility for 1.0 on too.

Any thoughts?

Thanks,

Ian

Ok - sorted this. I was inserting the buttons into the group after positioning them and this seemed to wipe out any positioning I’d previously done.

By making sure inserting them into the group was the first thing I did for each button then the positioning worked fine.

Obviously graphics 1.0 didn’t require things to be done in this order.

Thanks!

Ian

Ok - sorted this. I was inserting the buttons into the group after positioning them and this seemed to wipe out any positioning I’d previously done.

By making sure inserting them into the group was the first thing I did for each button then the positioning worked fine.

Obviously graphics 1.0 didn’t require things to be done in this order.

Thanks!

Ian