Home All Groups Group Topic Archive Search About

Highlight in Tree view

Author
8 Mar 2006 2:59 PM
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.

Author
8 Mar 2006 3:22 PM
Claes Bergefall
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

Show quoteHide quote
"sureshsmani" <sure***@meritoutsource.co.uk> wrote in message
news:eREJqDsQGHA.5768@tk2msftngp13.phx.gbl...
> 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.
>
>
Author
9 Mar 2006 6:29 AM
sureshsmani
It worked.    Thanks for you help.


Show quoteHide quote
"Claes Bergefall" <claes.bergefall@nospam.nospam> wrote in message
news:uOaguPsQGHA.1572@tk2msftngp13.phx.gbl...
> 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
>
> "sureshsmani" <sure***@meritoutsource.co.uk> wrote in message
> news:eREJqDsQGHA.5768@tk2msftngp13.phx.gbl...
> > 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.
> >
> >
>
>
Author
10 Mar 2006 1:11 PM
Brian Henry
not sure why you'd want to disable that and make it harder to read? but that
is called a tooltip for future reference


Show quoteHide quote
"sureshsmani" <sure***@meritoutsource.co.uk> wrote in message
news:eREJqDsQGHA.5768@tk2msftngp13.phx.gbl...
> 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.
>
>