1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-07 17:34:06 +02:00

Forgot something!

This commit is contained in:
chylex 2017-07-09 02:55:48 +02:00
parent a453888ca2
commit 4ebc0c10b6

View File

@ -106,6 +106,18 @@ public Button AddButton(string title, DialogResult result = DialogResult.OK, Con
ClientWidth = Math.Max(realFormWidth, minFormWidth);
RecalculateButtonLocation();
if (type.HasFlag(ControlType.Accept)){
AcceptButton = button;
}
if (type.HasFlag(ControlType.Cancel)){
CancelButton = button;
}
if (type.HasFlag(ControlType.Focused)){
ActiveControl = button;
}
return button;
}