C#: Add ToolTip To A PictureBox
Posted by blogmeister on
February 5, 2009
While some controls within Visual Studio include a property to have a ToolTip, some do not. Take the case of a PictureBox. Since there is no tooltip property for you to set a tooltip text, you would have to do it programmatically. The ToolTip class is part of the System.Drawing namespace. To add a tooltip to a PictureBox object, simply do this code.
|
1 2 |
ToolTip tt = new ToolTip(); tt.SetToolTip(pictureBoxObject, "This is a tooltip text"); |












