Skip to content

Is there a way to have a horizontal group of buttons that take up even amounts of space? #2057

Answered by cwensley
Shadowblitz16 asked this question in Q&A
Discussion options

You must be logged in to vote

Try something like:

var layout = new DynamicLayout();
// take up all space at the top
layout.Add(Drawable, yscale: true); 

// begin a new section for the buttons
layout.BeginVertical();
layout.BeginHorizontal();
layout.Add(button1, xscale: true);
layout.Add(button2, xscale: true);
layout.Add(button3, xscale: true);
layout.Add(button4, xscale: true);
layout.EndHorizontal();
layout.EndVertical();

Content = layout;

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Shadowblitz16
Comment options

@cwensley
Comment options

Answer selected by Shadowblitz16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants