Click to See Complete Forum and Search --> : add a tooltip message to listview


dky1e
July 3rd, 2002, 01:37 PM
Hi, I want to add a tooltip message to my buttons and list view items. Is there a built in funtion that can make it easy for me?

Please point me in the right direction :)

Thanks!

jparsons
July 3rd, 2002, 02:14 PM
Originally posted by dky1e
Hi, I want to add a tooltip message to my buttons and list view items. Is there a built in funtion that can make it easy for me?

Please point me in the right direction :)

Thanks!


public void SetupToolTips() {
Tooltip t = new ToolTip(this.components);

t.SetToolTip(mylistview,"My list view");
}

dky1e
July 3rd, 2002, 03:07 PM
Thanks!

But how can I attach the tooltip to each of the items?

jparsons
July 3rd, 2002, 07:16 PM
Originally posted by dky1e
Thanks!

But how can I attach the tooltip to each of the items?

Keep calling SetToolTip() for each item you want to set a tooltip for

dky1e
July 4th, 2002, 11:12 AM
I'm sorry, I don't understand. I tried doing setTooltip( listviewitem,"adf"); but it doesnt allow me to do that.

Could you post a quick sample? Thanks.

jparsons
July 5th, 2002, 12:20 PM
Originally posted by dky1e
I'm sorry, I don't understand. I tried doing setTooltip( listviewitem,"adf"); but it doesnt allow me to do that.

Could you post a quick sample? Thanks.

Check out htis Article on MSDN. it's the best source that I know of.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformstooltipclasstopic.asp