Open MelonWang1 opened 1 month ago
PR 11732 only fixes the misnaming issue, it doesn't fix the issue where ToolStripTextBox gets the focus and then triggers a refresh of the entire control causing it to lose focus.
Verified the issue on feature/10.0 branch of dotnet/winforms repo that the " extra numbers" issue of ToolStripMenuItem has been fixed, but the issue where ToolStripTextBox gets the focus and then triggers a refresh of the entire control causing it to lose focus still exist.
@Zheng-Li01 please retest this part
but the issue where ToolStripTextBox gets the focus and then triggers a refresh of the entire control causing it to lose focus still exist.
on the latest main with this PR - https://github.com/dotnet/winforms/issues/11909
In the latest main branch, have the issue https://github.com/dotnet/winforms/issues/11862 when clicking the smarttag, and will verified this issue after the https://github.com/dotnet/winforms/issues/11862 was resolved.
Thanks, @Zheng-Li01 !
@Zheng-Li01 please retest this part
but the issue where ToolStripTextBox gets the focus and then triggers a refresh of the entire control causing it to lose focus still exist.
on the latest main with this PR - #11909
Verified the issue with latest main branch of dotnet/winforms repo, this part issue still reproduce.
Call stack for "ToolStripTextBox cannot get focus" issue
System.Windows.Forms.Design.dll!System.ComponentModel.Design.SelectionService.System.ComponentModel.Design.ISelectionService.SetSelectedComponents(System.Collections.ICollection components, System.ComponentModel.Design.SelectionTypes selectionType) Line 408 C#
System.Windows.Forms.Design.dll!System.Windows.Forms.Design.ToolStripItemBehavior.OnMouseDown(System.Windows.Forms.Design.Behavior.Glyph g, System.Windows.Forms.MouseButtons button, System.Drawing.Point mouseLoc) Line 428 C#
System.Windows.Forms.Design.dll!System.Windows.Forms.Design.Behavior.BehaviorService.OnMouseDown(System.Windows.Forms.MouseButtons button, System.Drawing.Point mouseLoc) Line 670 C#
System.Windows.Forms.Design.dll!System.Windows.Forms.Design.Behavior.BehaviorService.AdornerWindow.WndProcProxy(ref System.Windows.Forms.Message m, int x, int y) Line 350 C#
System.Windows.Forms.Design.dll!System.Windows.Forms.Design.Behavior.BehaviorService.AdornerWindow.MouseHook.ProcessMouseMessage(Windows.Win32.Foundation.HWND hwnd, Windows.Win32.MessageId msg, int x, int y) Line 196 C#
System.Windows.Forms.Design.dll!System.Windows.Forms.Design.Behavior.BehaviorService.AdornerWindow.MouseHook.MouseHookProc(int nCode, Windows.Win32.Foundation.WPARAM wparam, Windows.Win32.Foundation.LPARAM lparam) Line 99 C#
.NET version
.NET 9.0 main branch of WinForms repo
Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No, this issue also repro in release/9.0-preview3 branch of WinForms repo. Maybe releate PR 10979.
Issue description
Current Behavior : In DemoConsole test app of WinForms repo, the name and text property of ToolStripMenuItem has extra numbers. Except for ToolStripMenuItem, ToolStripComboBox, ToolStripTextBox and ToolStripSeparator do not have selection borders.
https://github.com/user-attachments/assets/639dea54-f1bd-418d-8d4f-b29b4eec364e
Expected Behavior: No extra numbers of ToolStripMenuItem. And ToolStripComboBox, ToolStripTextBox, ToolStripSeparator should have selection border.
https://github.com/user-attachments/assets/6ccdcbda-08e4-40a3-a45f-e044fdd7759c
Steps to reproduce
Test sample: DemoConsole in Winforms repo