dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.41k stars 984 forks source link

[Accessibility] The mouse tooltip of second TabPage is not correct when setting TabControl, tabpages' tooltip, and another control's tooltip #4750

Closed Olina-Zhang closed 2 years ago

Olina-Zhang commented 3 years ago

Repro steps:

  1. Create a Winforms .Net Core app
  2. Add a TabControl, a Tooltip, a Button to form designer
  3. Focus on TabControl, go to Properties window, set TabControl's ShowToolTips as True, then set TabControl's Tooltip on toolTip1 property as "TabControl", set Tabpages' TooltipText with "TabPage1" and "TabPage2"
  4. Set anther control: button's Tooltip on toolTip1 property as "button1" --- it is necessary step
  5. Build and run app

Or open attached application: WinFormsApp12.zip

Actual behavior: Keyboard to focus on Button, then Tab to Tabpage1, then mouse-over Tagpage2 to show mouse tooltip, Tabpage2 display is not correct: Tabpage2 tooltip shows TabControl's image TabPageTooltipIssue

Expected behavior: Tabpage2 shows "TabPage2" tooltip

SergeySmirnov-Akvelon commented 3 years ago

Hi @merriemcgaw. I would like to add information about the version of this bug. It is not a #4421 regression. I can reproduce the problem for .NET Core 3.0 Issue-4750-3 0

Also, if I turn on quirks for displaying tooltips:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <startup>
      <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
   </startup>
   <runtime>
      <!-- AppContextSwitchOverrides values are in the form of 'key1=true|false;key2=true|false  -->
      <!-- Please note that disabling Switch.UseLegacyAccessibilityFeatures, Switch.UseLegacyAccessibilityFeatures.2 and Switch.UseLegacyAccessibilityFeatures.3 is required to disable Switch.System.Windows.Forms.UseLegacyToolTipDisplay -->
      <AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false;Switch.UseLegacyAccessibilityFeatures.2=false;Switch.UseLegacyAccessibilityFeatures.3=false;Switch.System.Windows.Forms.UseLegacyToolTipDisplay=false"/>
   </runtime>
</configuration>

then this bug will also be reproducible for .NET Framework 4.8 Issue-4750-4 8 1

merriemcgaw commented 3 years ago

I'm thinking that this can be lowered in priority - we don't have anybody that has directly reported it as a problem. What happens when we use tab key to move through the tabs? Do we see the right ToolTips then?

SergeySmirnov-Akvelon commented 3 years ago

@merriemcgaw, this did not work correctly in .NET Core 5.0 and earlier: Issue-4750-beforefix

But it was fixed in the #4421 for .NET Core 6.0: Issue-4750-afterfix

IDEExperienceTestSolution commented 2 years ago

Verified with .NET SDK 7.0.100-alpha.1.22069.1 build, this issue was fixed now: Fixed

IDEExperienceTestSolution commented 2 years ago

Verified with .NET SDK 7.0.100-preview.1.22109.10 build, this issue is fixed, the result is same as above GIF shown.

ghost commented 2 years ago

Hi @VinoWang01, it looks like you just commented on a closed issue. The team will most probably miss it. If you have a question - consider opening a new discussion thread. Alternatively, you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.