sep Posted August 4, 2017 Share Posted August 4, 2017 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? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 4, 2017 Share Posted August 4, 2017 Here we are: https://www.babylonjs-playground.com/#XCPP9Y#169 Quote Link to comment Share on other sites More sharing options...
sep Posted August 4, 2017 Author Share Posted August 4, 2017 Ah! You put the StackPanel inside the Rectangle which is possible since Container extends Control. The thought did not even cross my mind. Thanks Deltakosh! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.