After setting "OwnerDraw" property as "true" and later using Draw event handler we can draw custom shapes or strings but I wanted to know how can we set the rectangle or region of that tooltip so that the objects or shapes(like ellipse or pie or other shapes) get fit in it.
I tried like adding such code:
private void toolTip1_Draw(object sender, DrawToolTipEventArgs e)
{
e.Graphics.FillPie(Brushes.Green, new Rectangle(0, 0, 30, 30), 0, 120);
}
but this code works only if I add spaces or lines in the tooltip text so that to extend the region of tooltip. For the same I added :
private void Form1_MouseHover(object sender, EventArgs e)
{
toolTip1.Show(" \n\n\n", this);
}
So I don't feel this as efficient solution to extend region. Is there any other way I could extend the rectangle or region of the tooltip? Moreover extending region this way won't help in having accurate spaces in various drawing performed on it.