Skip to content

AutoEllipsis documentation is ambiguous #7046

@ptoye

Description

@ptoye

🛑 IMPORTANT: You can get your feedback addressed faster if you use the comment section for the article in which you encountered a problem.
There isn't a "comment" section in this article!

Link to article:
Tell us where exactly a problem occurs.
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.buttonbase.autoellipsis?view=netframework-4.7.1#System_Windows_Forms_ButtonBase_AutoEllipsis

Problem:
What's wrong with the article?
The "remarks" section is ambiguous. It says that text is displayed when the mouse hovers over a button where the text is too wide. It doesn't say what this means. It turns out that this is done with a Tooltip. I suggest that this is made clearer in the doc.

In addition, there are bugs in the code which displays the tooltip. Firstly, if the text can flow over more than one line no ellipsis is shown (correct) but the Tooltip still appears (incorrect). Secondly, if there is just enough space for the text on one line, the same happens. Surely, the pseudo-code should read something like
on Mousehover if auto-ellipsis is showing then display tooltip rather than trying to work out if the text is too wide and getting it wrong.

It would also be more user-friendly if the automatic Tooltip didn't overwrite any programmed tooltips.

I've got screenshots and a program which shows the issue, but they won't upload for some reason.

I'm using Visual Studio Community 2017 and Windows 7 if that helps.

**NOTE - This was first posted 2 years ago as MicrosoftDocs/feedback#1399 but I have just been asked to move this topic to another issue. The latest documentation has the same bug. I have not been able to determine whether the issue is still present in .NET 5.0 **

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-WinFormsIssues or PRs that relate to WinForms.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions