This content has been marked as final. Show 3 replies
"jim1234" <email@example.com> wrote in message
> Hi all,
> I have a viewstack that is within a Canvas (I also had it within a HBox).
> of the objects within the viewstack is a panel. For the life of me I
> can't get
> the panel to center.
> I've tried horizontalCenter="0" on all the objects in the hierarchy with
> luck. I've also tried horizontalAlign="center" on the panel. Nothing
> seems to
> center the panel.
Use constraint based layout.
Ok, I figured out a way around this. I put the panel within it's own canvas and set the horizontalCenter="0" on the canvas and it centers.
Seems like you should be able to do it with just the panel as well, but oh well.
Could be because the ViewStack is in a Canvas. Maybe post "complete" yet "simplified" code example displaying problem.