【发布时间】:2013-04-19 07:59:54
【问题描述】:
我想创建一个包含以下内容的自定义工具提示:
- 右上角的图片
- 左侧文字
目前我有一个继承自 ToolTip Objekt 的类。
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”中显示带有文本的图像。
感谢您的帮助
【问题讨论】:
标签: c# custom-controls tooltip system.drawing