Category / Section
How to set Transparent color for the ToolTip Image?
1 min read
Transparent color can be used on Header, Body, or Footer image of the SuperToolTip. This can be set by using the ImageTransparentColor property of the ToolTipInfo object.
The following code example demonstrates the same.
C#
//Sets the header image. toolTipInfo.Body.Image = Image.FromFile("..\\..\\pic.jpg"); //Sets the image size. toolTipInfo.Body.ImageScalingSize = new System.Drawing.Size(40, 40); //Sets the transparent color. toolTipInfo.Header.ImageTransparentColor = Color.White; //Sets the SuperToolTip to the list box. this.superToolTip1.SetToolTip(this.listBox1, toolTipInfo);
VB
'Sets the header image toolTipInfo.Body.Image = Image.FromFile("..\..\pic.jpg") 'Sets the image size. toolTipInfo.Body.ImageScalingSize = New System.Drawing.Size(40, 40) 'Sets the transparent color. toolTipInfo.Header.ImageTransparentColor = Color.White 'Sets the SuperToolTip to the list box. Me.superToolTip1.SetToolTip(Me.listBox1, toolTipInfo)
Figure 1: SuperToolTip with transparent image