문제

I have a pictureBox inside a Winforms DataRepeater for which I want to set the tooltip, I tried

ToolTip tt = new ToolTip();
tt.SetToolTip(dataRepeater1.ItemTemplate.Controls["picDeleteEntry"]
                                                       ,"Delete This Entry");

I also tried

tt.SetToolTip(picDeleteEntry, "Delete This Entry");

still its not showing tooltip.

How to solve?

도움이 되었습니까?

해결책

Finally I arrived at a solution, but let me know if any still better solution is available

my idea is like this:

in mouseHover event of the PictureBox inside DataRepeater, set the tooltip like this

if (tt.GetToolTip((PictureBox)sender)==string.Empty)
    tt.SetToolTip((PictureBox)sender, "Delete This Entry");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top