Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Creating multiline tooltips

Total Hit ( 3353)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


In VB6 there was no easy way to create multiline tooltips for form controls, you necessarily had to resort to API tricks. And it was probably just not worth the effort. The good news is that doing this is straightforward in VB.NET! First add a Tooltip Provider control on the form to add the Tooltip On TooltipProviderCtl property to all the controls on the form, and set your tooltip as a single line long text. Finally, go to the code view, within the InitializeComponent method locate the line that set the tooltip, and split the tooltip text with new-line characters, as you would do with any other string. Here's an example:

Click here to copy the following block
Me.ToolTipProviderCtl.SetToolTip(Me.Button1, "this is" & environment.NewLine & _
  "a multiline" & environment.NewLine & "tooltip!")

Instead of modifying the code directly in InitializeComponent, you can programmatically set multiline tooltips for your controls in a separate method, called from Form_Load.


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.