Setting ToolTips for Controls on a Windows Form
You can set a ToolTip string in code or in the designer.
To set a tool tip programmatically
1. Add the control that will display the ToolTip.
2. Use the SetToolTip method of the
ToolTip component.
____________________________________
'Visual Basic ' In this example, Button1 is the control to display the ToolTip. ToolTip1.SetToolTip(Button1, "Save changes")
____________________________________
// C# // In this example, button1 is the control to display the ToolTip. toolTip1.SetToolTip(button1, "Save changes");
____________________________________
// C++ // In this example, button1 is the control to display the ToolTip. toolTip1->SetToolTip(button1, S"Save changes");
____________________________________
To set a tool tip in the designer
1. Add a ToolTip component to the form.
2. Select the control that will display the ToolTip, or add it to the form.
3. In the Properties window, set the ToolTip on ToolTip1 value
No comments:
Post a Comment