Jump to content

Align GUI.StackPanel to corner


sep
 Share

Recommended Posts

Using a GUI container such as Rectangle, one is able to align the container to a corner using the following assignments:

rect.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
rect.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP;

However, when using a StackPanel, setting the above properties does not have the same effect. Depending on the value of isVertical, the container will get aligned to either top or left, but not both.

Effectively, I am looking to position the StackPanel in the corner in a way that is not effected by screen size.

Is this achievable by manipulating these properties or should I somehow be using the 'top' and 'left' properties?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...