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

@@ -60,6 +60,11 @@ public partial class RadFlyoutBase : UserControl
InitializeComponent(); InitializeComponent();
ParentChanged += FlyoutDialogBase_ParentChanged; ParentChanged += FlyoutDialogBase_ParentChanged;
// Change TabIndex to a very high value
// -> prevent conflicts with controls based on this class
radButton_Cancel.TabIndex = int.MaxValue - 1;
radButton_Cancel.TabIndex = int.MaxValue;
// SVG Symbols // SVG Symbols
radButton_Cancel.SvgImage = CancelSvg; radButton_Cancel.SvgImage = CancelSvg;
radButton_Confirm.SvgImage = ConfirmSvg; radButton_Confirm.SvgImage = ConfirmSvg;

View File

@@ -43,10 +43,15 @@ public partial class FlyoutBase : UserControl
public FlyoutBase() public FlyoutBase()
{ {
InitializeComponent(); 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(); var frm = FindForm();
if (frm != null) if (frm != null)