Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ToolStripMenuItem has extra numbers and the other items do not have selection borders on ContextMenuStrip control in DemoConsole application #11700

Open
MelonWang1 opened this issue Jul 18, 2024 · 7 comments · Fixed by #11732
Assignees
Labels
🚧 work in progress Work that is current in progress
Milestone

Comments

@MelonWang1
Copy link
Contributor

MelonWang1 commented Jul 18, 2024

.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.

contextmenustrip.mp4

Expected Behavior:
No extra numbers of ToolStripMenuItem. And ToolStripComboBox, ToolStripTextBox, ToolStripSeparator should have selection border.

designer.mp4

Steps to reproduce

Test sample: DemoConsole in Winforms repo

  1. Select ContextMenuStrip control.
  2. Input 'test' to Type Here, press 'Enter' key.
  3. Select 'test' ToolStripMenuItem.
  4. Add a ToolStripMenuItem using dropdown item.
  5. Add ToolStripComboBox, ToolStripTextBox, ToolStripSeparator.
@MelonWang1 MelonWang1 added the untriaged The team needs to look at this issue in the next triage label Jul 18, 2024
@SimonZhao888 SimonZhao888 self-assigned this Jul 23, 2024
@Tanya-Solyanik Tanya-Solyanik removed the untriaged The team needs to look at this issue in the next triage label Jul 23, 2024
@Tanya-Solyanik Tanya-Solyanik added this to the .NET 10.0 milestone Jul 23, 2024
@SimonZhao888
Copy link
Member

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.

@dotnet-policy-service dotnet-policy-service bot added the 🚧 work in progress Work that is current in progress label Aug 1, 2024
@Zheng-Li01
Copy link
Member

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.
gh11700

@Tanya-Solyanik
Copy link
Member

@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

@Zheng-Li01
Copy link
Member

In the latest main branch, have the issue #11862 when clicking the smarttag, and will verified this issue after the #11862 was resolved.

@Tanya-Solyanik
Copy link
Member

Thanks, @Zheng-Li01 !

@SimonZhao888 SimonZhao888 removed their assignment Sep 3, 2024
@Zheng-Li01
Copy link
Member

@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.

GH11700

@LeafShi1
Copy link
Member

LeafShi1 commented Sep 3, 2024

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#

@LeafShi1 LeafShi1 self-assigned this Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧 work in progress Work that is current in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants