tooltip in vb.net

jaya

Member
Joined
May 5, 2005
Messages
15
Programming Experience
Beginner
in asp.net ,if we want to set tooltip property for a textbox,we ll mention it in the properties and give the message there.

but what do i do in vb.net for setting tooltip property for a textbox.
in the property list this option is not given.

i added tooltip programatically using a amethod,but i didnt understand where to put that function.(in form_load or in button_click)
pls any one let me know
 
No, your right, the property is not added to the property list once you add the ToolTip component.

How to:
1: Drag a ToollTip onto your form
2: Double click the form (so that your in the form_load event)
3: Paste in this code and change it to suit your needs

VB.NET:
ToolTip1.SetToolTip(txtFullName, "Please enter your name here")

Things you should know:
1: You will have to change the txtFullName part to the name of the control you want the tooltip to be set for.
2: If you changed the name of the tooltip component you will have to change that

Hope This Helps
 
drag the tooltip object from the toolbox and drop it on the form now click on the textbox and look for the Tooltip on Tooltip1 property of that textbox
 
Just to clarify, JuggaloBrotha's method creates the line of code that bfsog suggests in the auto-generated code area. You would only use bfsog's method of setting the ToolTip text at run time if you didn't know what the text was at design time or you wanted to change it from its design time value. Also, if you want to remove a ToolTip from a control you simply use bfsog's method with an empty string. You won't get an empty yellow box, but rather no box at all.
 
Back
Top