increase TabIndex of cancel and ok buttons

This commit is contained in:
Pilzinsel64
2024-07-22 14:55:49 +02:00
parent 170d88b247
commit 69c44d53c0
2 changed files with 12 additions and 2 deletions

View File

@@ -43,10 +43,15 @@ public partial class FlyoutBase : UserControl
public FlyoutBase()
{
InitializeComponent();
ParentChanged += FlyoutBase_ParentChanged; ;
ParentChanged += FlyoutBase_ParentChanged;
// Change TabIndex to a very high value
// -> prevent conflicts with controls based on this class
button_Cancel.TabIndex = int.MaxValue - 1;
button_Cancel.TabIndex = int.MaxValue;
}
private void FlyoutBase_ParentChanged(object sender, System.EventArgs e)
private void FlyoutBase_ParentChanged(object? sender, EventArgs e)
{
var frm = FindForm();
if (frm != null)