Closed Shadowblitz16 closed 3 weeks ago
I am moving this to discussions. Here is the proper way to add one control to another:
var editor = new TextBox();
editor.Parent = someParent;
Also you can disable/enable layout:
someParent.SuspendLayout();
var editor = new TextBox();
editor.Parent = someParent;
var button = new Button();
button.Parent = someParent;
someParent.ResumeLayout();
These should be unified. Right now it's really hard to build ui in C# because if we use the wrong method it doesn't get laid out properly.