我在Winforms DataRepeater中有一个pictureBox,我想为它设置工具提示,我尝试了
ToolTip tt = new ToolTip();
tt.SetToolTip(dataRepeater1.ItemTemplate.Controls["picDeleteEntry"]
,"Delete This Entry");我也试过了
tt.SetToolTip(picDeleteEntry, "Delete This Entry");它仍然没有显示工具提示。
如何解决?
发布于 2011-11-11 19:27:12
最后我得到了一个解决方案,但如果有更好的解决方案,请告诉我。
我的想法是这样的:
在PictureBox inside DataRepeater的事件中,如下所示设置工具提示
if (tt.GetToolTip((PictureBox)sender)==string.Empty)
tt.SetToolTip((PictureBox)sender, "Delete This Entry");https://stackoverflow.com/questions/8092421
复制相似问题