Ticket T334319
Visible to All Users

How to show Multiline Tooltip

created 9 years ago

Hello,

I would like to use a multi-line tooltip in my .Net project. I have found one reference to this issue in your forums, but the solution is now so old that it will not compile. I can’t imagine that this is a big issue, but none-the-less ask whether it be possible please to show how to display a multi-line tooltip using C# or VB (with a preference for the latter). Such an example would be greatly appreciated.

A loyal and very happy customer,
Sean

Answers

created 9 years ago

Hi,

To show a multiline text in a tooltip, it is sufficient to insert new line characters to this text.

C#
simpleButton1.SuperTip = new SuperToolTip(); simpleButton1.SuperTip.Items.Add(new ToolTipItem() { Text = "Line1\r\nLine2\r\nLine3" }); //or simpleButton1.ToolTip = "Line1\r\nLine2\r\nLine3";

For VB.NET, use the Constants.vbNewLine field.

If you need to enable the word wrap feature, it is enabled by default. Is the tooltip text cut off on your side? Please provide us with screenshots to show the current and expected results.

    Show previous comments (4)
    DevExpress Support Team 5 years ago

      Hi,

      We are using System.ComponentModel.Design.MultilineStringEditor to edit tooltip text at design time when operating the BaseControl.ToolTip property. In this case, it is necessary to click a combo button to expand a popup window for typing multiline text.

      In turn, a default single-line UITypeEditor is used when using attached properties that appear for standard controls when placing ToolTipController onto a form. We are ready to support System.ComponentModel.Design.MultilineStringEditor for this case as well in version 19.2. However, you indicated version 15.2.4 in the current ticket. We do not publish updates for this version any longer. Would you please clarify if you can move to version 19.2?

        We are currently on 19.1. We could move to 19.2 but it will take a lot of testing to make sure you haven't made any changes that impact our implementations of your classes. Is 19.1 still supported by updates? Meaning is it possible to get this functionality without having to upgrade to 19.2 on our end? Thank you!

        DevExpress Support Team 5 years ago

          Hi,

          Yes, we release minor updates for version 19.1. Once we fix this shortcoming, we will include changes in the next minor update - 19.1.9.
          I have created a new report (ToolTipController - It is impossible to enter multiline text at design time for the attached ToolTip property) regarding this issue, so that you can track our progress.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.