Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pos.Align to ease aligning subviews: Left, Right, Center, Justify #1785

Closed
tig opened this issue Jun 11, 2022 · 1 comment
Closed

Add Pos.Align to ease aligning subviews: Left, Right, Center, Justify #1785

tig opened this issue Jun 11, 2022 · 1 comment
Assignees
Labels
enhancement v2 For discussions, issues, etc... relavant for v2
Milestone

Comments

@tig
Copy link
Collaborator

tig commented Jun 11, 2022

Pos/Dim work wonders for layout. However, aligning a set of controls (e.g. in the center) requires quite a bit of annoying code.

E.g. Dialog has this code to center buttons:

image

The new Wizard has fairly generic code for center, justify, right, and left alignment of buttons.

I would be easy to extract this code such that it would be easy to take a group of controls and horizontally align them.

The same thing could be done vertically.

e.g.

void LayoutStartedHandler ()
{
  View.AlignControls (Alignments.Justify, arrayOfControls);
}
@tig tig added the v2 For discussions, issues, etc... relavant for v2 label Apr 19, 2023
@tig tig added this to the v1.10 milestone Apr 19, 2023
@tig tig changed the title Add Justify Controls feature to View Add Pos.Justify to ease aligning subviews: Left, Right, Center, Justify Jan 19, 2024
@tig
Copy link
Collaborator Author

tig commented Jan 19, 2024

This will partially address this, by making right justification easier:

Related:

@tig tig changed the title Add Pos.Justify to ease aligning subviews: Left, Right, Center, Justify Add Pos.Align to ease aligning subviews: Left, Right, Center, Justify May 10, 2024
@tig tig moved this to 📋 v2 BETA Backlog in Terminal.Gui V2 Beta May 12, 2024
@tig tig moved this from 📋 v2 BETA Backlog to 🏗 In progress in Terminal.Gui V2 Beta May 13, 2024
@tig tig modified the milestones: v1.10, V2 Beta May 25, 2024
@tig tig self-assigned this May 25, 2024
tig added a commit that referenced this issue May 26, 2024
Fixes #1785. Adds `Pos.Align` - Align sets of views horizontally or vertically
@tig tig closed this as completed May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement v2 For discussions, issues, etc... relavant for v2
Projects
Status: ✅ Done
Status: 🏗 Approved - In progress
Development

No branches or pull requests

1 participant