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

Automatically resize form? #1591

Closed
cyanfish opened this issue Feb 23, 2020 · 0 comments · Fixed by #1930
Closed

Automatically resize form? #1591

cyanfish opened this issue Feb 23, 2020 · 0 comments · Fixed by #1930
Milestone

Comments

@cyanfish
Copy link
Contributor

When creating a form, by default, it's sized based on the contents. This is great. But is there a way to have the form resize when the content size changes? It doesn't seem to do that by default.

Code that Demonstrates the Problem

    class MyForm : Form
    {
        public MyForm()
        {
            var layout = new DynamicLayout();
            layout.BeginVertical();
            layout.AddRow(new Label { Text = "hello" });
            var panel = new Panel();
            layout.AddRow(panel);
            var button = new Button { Text = "Click me" };
            button.Click += (sender, args) => panel.Content = new Label { Text = "world" };
            layout.AddRow(button);
            layout.EndVertical();
            Content = layout;
        }
    }

Specifications

  • Version: 2.5.0
  • Platform(s): WPF + WinForms
  • Operating System(s): Windows 10
@cwensley cwensley added this to the 2.5.11 milestone Apr 20, 2021
cwensley added a commit to cwensley/Eto that referenced this issue Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants