add controls on load
- hopefully fixes initial focus being on confirm button
This commit is contained in:
@@ -84,8 +84,6 @@ public partial class FlyoutBase : UserControl
|
||||
[MemberNotNull(nameof(button_Accept))]
|
||||
private void InitializeComponent()
|
||||
{
|
||||
SuspendLayout();
|
||||
|
||||
// button_Accept
|
||||
button_Accept = new Button
|
||||
{
|
||||
@@ -153,14 +151,22 @@ public partial class FlyoutBase : UserControl
|
||||
// FlyoutBase
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(tableLayoutPanel_ActionPanel);
|
||||
Controls.Add(tableLayoutPanel_TitlePanel);
|
||||
Size = new Size(300, 150);
|
||||
|
||||
tableLayoutPanel_TitlePanel.ResumeLayout(false);
|
||||
tableLayoutPanel_ActionPanel.ResumeLayout(false);
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
SuspendLayout();
|
||||
Controls.Add(tableLayoutPanel_ActionPanel);
|
||||
tableLayoutPanel_ActionPanel.BringToFront();
|
||||
Controls.Add(tableLayoutPanel_TitlePanel);
|
||||
tableLayoutPanel_TitlePanel.BringToFront();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
base.OnLoad(e);
|
||||
}
|
||||
|
||||
private void FlyoutBase_ParentChanged(object? sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user