Solved tooltip display width

Posted on 2005-04-23
Last Modified: 2008-02-07
in how do you set the display width for tool tips.

when i enter long descriptions they display as wide as my screen.
what can i do to limit the width and force the wrap.
this can't be that hard can it.

           Dim scToolTip As New ToolTip
            ' Set up the delays for the ToolTip.
            scToolTip.AutoPopDelay = 5000
            scToolTip.InitialDelay = 100
            scToolTip.ReshowDelay = 500
            scToolTip.ShowAlways = True
Question by:Autoeforms
    LVL 6

    Accepted Solution

    There is no way i can find of minimising the width, howevre if you find out at what point you reach your favoured width for the tooltip you could make it perform a line feed.

    For example:-

                Dim scToolTip As New ToolTip
                ' Set up the delays for the ToolTip.
                With scToolTip
                       .AutoPopDelay = 5000
                       .InitialDelay = 100
                       .ReshowDelay = 500
                       .ShowAlways = True
                       .SetToolTip(me.Control, "This is the first Line" & Chr(10) & "And this is the second")
                End With

    This would create a tooltip on the me.Control (whatever control you decide) saying:-

    This is the first line
    And this is the second

    The Chr(10) is the ASCII character code for a line feed.
    LVL 8

    Author Comment

    didn't solve it but i inserted line feeds at the propler location and made the problem go away

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    This is about my first experience with programming Arduino.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now