diff --git a/Documents/Help/Changelog.md b/Documents/Help/Changelog.md index 961c0eff0..bf54ef8ac 100644 --- a/Documents/Help/Changelog.md +++ b/Documents/Help/Changelog.md @@ -1,8 +1,12 @@ # Standard Toolkit - ChangeLog ======= + # 2024-11-14 - Build 2411 (Patch 4) - November 2024 -* Resolved [#1820](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1820), When KryptonDataGridView.AutoGenerate is set Winforms columns are used. See the issue for full text. +* Resolved [#1837](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1837), `KryptonMessageBoxDefaultButton.Button2` doesn't work +* Resolved [#1820](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1820), When KryptonDataGridView.AutoGenerate is set WinForms columns are used. See the issue for full text. + +======= # 2024-10-14 - Build 2410 (Patch 3) - October 2024 * Implemented [#1813](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1813), LTS Configuration diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonMessageBox.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonMessageBox.cs index 7234f18b8..1e76b6052 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonMessageBox.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonMessageBox.cs @@ -367,6 +367,8 @@ private static DialogResult ShowCore(IWin32Window? owner, kmb.StartPosition = showOwner == null ? FormStartPosition.CenterScreen : FormStartPosition.CenterParent; + (kmb.AcceptButton as KryptonButton)?.Select(); + return kmb.ShowDialog(showOwner); } diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/KryptonMessageBoxForm.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/KryptonMessageBoxForm.cs index b4647157b..1f71cc8a1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/KryptonMessageBoxForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/KryptonMessageBoxForm.cs @@ -480,25 +480,23 @@ private void UpdateDefault() switch (_defaultButton) { case KryptonMessageBoxDefaultButton.Button1: - //_button1.Select(); + _button1.Select(); AcceptButton = _button1; break; case KryptonMessageBoxDefaultButton.Button2: - //_button2.Select(); + _button2.Select(); AcceptButton = _button2; break; case KryptonMessageBoxDefaultButton.Button3: - //_button3.Select(); + _button3.Select(); AcceptButton = _button3; break; case KryptonMessageBoxDefaultButton.Button4: + _button4.Select(); AcceptButton = _showHelpButton ? _button4 : _button1; - break; - case KryptonMessageBoxDefaultButton.Button5: - AcceptButton = _showActionButton ? _button5 : _button1; - break; default: + _button1.Select(); AcceptButton = _showHelpButton ? _button4 : _button1; break; } diff --git a/Source/Krypton Components/TestForm/Form1.Designer.cs b/Source/Krypton Components/TestForm/Form1.Designer.cs index a0ec5cd99..8774a88e1 100644 --- a/Source/Krypton Components/TestForm/Form1.Designer.cs +++ b/Source/Krypton Components/TestForm/Form1.Designer.cs @@ -88,6 +88,7 @@ private void InitializeComponent() this.kryptonIntegratedToolbarPrintCommand1 = new Krypton.Toolkit.KryptonIntegratedToolbarPrintCommand(); this.kryptonManager1 = new Krypton.Toolkit.KryptonManager(this.components); this.kryptonCheckSet1 = new Krypton.Toolkit.KryptonCheckSet(this.components); + this.kryptonButton9 = new Krypton.Toolkit.KryptonButton(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit(); this.kryptonPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.kryptonThemeComboBox1)).BeginInit(); @@ -96,6 +97,7 @@ private void InitializeComponent() // // kryptonPanel1 // + this.kryptonPanel1.Controls.Add(this.kryptonButton9); this.kryptonPanel1.Controls.Add(this.kcbtnFormBorderStyleSizableToolWindow); this.kryptonPanel1.Controls.Add(this.kcbtnFormBorderStyleFixedToolWindow); this.kryptonPanel1.Controls.Add(this.kcbtnFormBorderStyleSizable); @@ -517,6 +519,15 @@ private void InitializeComponent() this.kryptonCheckSet1.CheckButtons.Add(this.kcbtnFormBorderStyleSizableToolWindow); this.kryptonCheckSet1.CheckedButton = this.kcbtnFormBorderStyleNone; // + // kryptonButton9 + // + this.kryptonButton9.Location = new System.Drawing.Point(14, 415); + this.kryptonButton9.Name = "kryptonButton9"; + this.kryptonButton9.Size = new System.Drawing.Size(183, 25); + this.kryptonButton9.TabIndex = 26; + this.kryptonButton9.Values.Text = "Test #1837"; + this.kryptonButton9.Click += new System.EventHandler(this.kryptonButton9_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -608,5 +619,6 @@ private void InitializeComponent() private Krypton.Toolkit.KryptonContextMenuImageSelect kryptonContextMenuImageSelect1; private Krypton.Toolkit.KryptonContextMenuMonthCalendar kryptonContextMenuMonthCalendar1; private Krypton.Toolkit.KryptonContextMenuCheckBox kryptonContextMenuCheckBox1; + private Krypton.Toolkit.KryptonButton kryptonButton9; } } \ No newline at end of file diff --git a/Source/Krypton Components/TestForm/Form1.cs b/Source/Krypton Components/TestForm/Form1.cs index 0dc9a6f95..06794d0a7 100644 --- a/Source/Krypton Components/TestForm/Form1.cs +++ b/Source/Krypton Components/TestForm/Form1.cs @@ -309,5 +309,11 @@ private void kcbtnFormBorderStyleSizableToolWindow_Click(object sender, EventArg { UpdateFormBorderStyle(FormBorderStyle.SizableToolWindow); } + + private void kryptonButton9_Click(object sender, EventArgs e) + { + KryptonMessageBox.Show("question?", "title", KryptonMessageBoxButtons.YesNo, + KryptonMessageBoxIcon.Warning, KryptonMessageBoxDefaultButton.Button2); + } } } \ No newline at end of file