我希望创建一个包含以下内容的自定义工具提示:
- 图片位于右上角
- 文本位于左侧
目前我有一个继承自ToolTip对象的类。
class CustomToolTip : ToolTip
{
public CustomToolTip()
{
this.OwnerDraw = true;
this.Popup += new PopupEventHandler(this.OnPopup);
this.Draw += new DrawToolTipEventHandler(this.OnDraw);
}
private void OnPopup(object sender, PopupEventArgs e)
{
e.ToolTipSize = new Size(200, 100);
}
private void OnDraw(object sender, DrawToolTipEventArgs e)
{
}
}
但我不知道在"OnDraw-Event"中怎么做才能展示一张带文字的图片。
谢谢你的帮助。