locked
Wrap Tooltip Text RRS feed

  • Question

  • Hey !! 

    Text of my tool tip is too large, is there any way to wrap the text n get it in 2 lines ??

     

    Thanks in advance !!

     

     

    Wednesday, April 7, 2010 9:33 AM

Answers

  • Add "\n" in the tooltip to where you want the line break.

    .ToolTip = "Line1\nLine2"

    If you are using ASP.NET, note that it looks like it doesn't work in Opera or Firefox (but does work in IE and Chrome.) You could however use a custom tooltip to adjust the width of the tooltip and force the text to wrap. There is an example in the websamples, Content > Interactivity And AJAX > Client Side Scripts > Displaying a Custom Tooltip

    • Edited by siplaModerator Wednesday, April 7, 2010 10:20 AM added custom tooltip note
    • Marked as answer by Ranjit Nair Wednesday, April 7, 2010 11:00 AM
    Wednesday, April 7, 2010 10:09 AM
    Moderator

All replies

  • Add "\n" in the tooltip to where you want the line break.

    .ToolTip = "Line1\nLine2"

    If you are using ASP.NET, note that it looks like it doesn't work in Opera or Firefox (but does work in IE and Chrome.) You could however use a custom tooltip to adjust the width of the tooltip and force the text to wrap. There is an example in the websamples, Content > Interactivity And AJAX > Client Side Scripts > Displaying a Custom Tooltip

    • Edited by siplaModerator Wednesday, April 7, 2010 10:20 AM added custom tooltip note
    • Marked as answer by Ranjit Nair Wednesday, April 7, 2010 11:00 AM
    Wednesday, April 7, 2010 10:09 AM
    Moderator
  • hey thanks !!! was of  great help :
    Wednesday, April 7, 2010 11:01 AM