Highlight in Tree view

  • Thread starter Thread starter sureshsmani
  • Start date Start date
S

sureshsmani

In the tree view, if the size of the text is longer than the size of the
control and the mouse is hovered on a item, the item is displayed in full
with a yellow highlight. Is is possible to disable that feature in the tree
view.

Suresh S.
 
You need to override it like this:

Public Class TreeViewEx
Inherits TreeView
Private Const TVS_NOTOOLTIPS As Integer = &H80
Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams
Get
Dim params As CreateParams = MyBase.CreateParams
params.Style = params.Style Or TVS_NOTOOLTIPS
Return params
End Get
End Property
End Class

/claes
 
It worked. Thanks for you help.


Claes Bergefall said:
You need to override it like this:

Public Class TreeViewEx
Inherits TreeView
Private Const TVS_NOTOOLTIPS As Integer = &H80
Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams
Get
Dim params As CreateParams = MyBase.CreateParams
params.Style = params.Style Or TVS_NOTOOLTIPS
Return params
End Get
End Property
End Class

/claes
 
not sure why you'd want to disable that and make it harder to read? but that
is called a tooltip for future reference
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

maintain tree view highlight 1
A Tree 5
Tree View 1
Tree List View 9
Highlight node in tree view 1
Best technique to store data locally 2
Customize tooltip... 1
Tree view node selection error 3

Back
Top