By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,386 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,386 IT Pros & Developers. It's quick & easy.

How to displays my own tooltip and a treeview ?

P: n/a
Hi all,

I have a treeview control. I want when my user hovers over
certain nodes to display a tooltip for the user. How can I do
that?

tnx.
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
I tried to do that some days ago. but nothing got. I want to know that too.

but, I suggest you to modify a tooltip object when select a treenode, then
show it.

<Lucio H> wrote in message news:eH**************@TK2MSFTNGP10.phx.gbl...
Hi all,

I have a treeview control. I want when my user hovers over
certain nodes to display a tooltip for the user. How can I do
that?

tnx.

Nov 21 '05 #2

P: n/a
Hi,

http://www.windowsformsdatagridhelp....6-16f7e283cbe9

Ken
----------------------
<Lucio H> wrote in message news:eH**************@TK2MSFTNGP10.phx.gbl...
Hi all,

I have a treeview control. I want when my user hovers over
certain nodes to display a tooltip for the user. How can I do
that?

tnx.

Nov 21 '05 #3

P: n/a
>
http://www.windowsformsdatagridhelp....6-16f7e283cbe9

Ken


sorry, I need the tip only after I click on a node, how do I change this to
use the Click event?

Private Sub trvNorthWind_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles trvNorthWind.MouseMove
Dim nd As TreeNode

Try
Dim pt As New Point(e.X, e.Y)
nd = trvNorthWind.GetNodeAt(pt)
ToolTip1.SetToolTip(trvNorthWind, nd.Text)
Catch
ToolTip1.SetToolTip(trvNorthWind, "")
End Try
End Sub
Nov 21 '05 #4

P: n/a
Hi,

Try something like this in the treeview click event

Dim n As TreeNode

Try
n = TreeView1.GetNodeAt(TreeView1.MousePosition)
ToolTip1.SetToolTip(trvNorthWind, nd.Text)
Catch
ToolTip1.SetToolTip(trvNorthWind, "")
End Try
Ken
-----------------
<Lucio H> wrote in message news:u2**************@TK2MSFTNGP09.phx.gbl...

http://www.windowsformsdatagridhelp....6-16f7e283cbe9

Ken


sorry, I need the tip only after I click on a node, how do I change this to
use the Click event?

Private Sub trvNorthWind_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles trvNorthWind.MouseMove
Dim nd As TreeNode

Try
Dim pt As New Point(e.X, e.Y)
nd = trvNorthWind.GetNodeAt(pt)
ToolTip1.SetToolTip(trvNorthWind, nd.Text)
Catch
ToolTip1.SetToolTip(trvNorthWind, "")
End Try
End Sub

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.