Re: Tooltip in TreeView control

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Try this:

private const int TVS_NOTOOLTIPS = 0x80;
protected override System.Windows.Forms.CreateParams CreateParams
{
get
{
CreateParams p = base.CreateParams;
p.Style = p.Style | TVS_NOTOOLTIPS;
return p;
}
}

/claes

"kuchuk" <skuchuk@xxxxxxxxx> wrote in message
news:1158146945.155729.313890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have a TreeView control in my project (I am working with VS2003, C#).
I also have a tooltip attached to it, which I use to display special
information once user places (MouseMove) the mouse on a TreeNode.
The TreeView control has a basic behaviour that once a TreeNode text
(name) exceeds the size of the control, a tooltip is displaying the
TreeNode text (name). now I have two tooltips showing:
1. treenode text (name).
2. my special information.
My aim is to prevent the first tooltip from showing. I tried to
override WndProc() in the following way:

protected override void WndProc(ref Message m)
{
if(m.Msg == TTN_SHOW)
{
//ignore tooltip show message
return;
}

base.WndProc (ref m);
}

IT DID NOT WORK!
I defined TTN_SHOW to be (found it in commctrl.h):
TTN_FIRST = (0U-520U)
TTN_SHOW = (TTN_FIRST - 1)
Apperantly this is not the message the control receives :(
could somone explain why?



.



Relevant Pages

  • Re: Tooltip in TreeView control
    ... protected override System.Windows.Forms.CreateParams CreateParams ... I have a TreeView control in my project ... I also have a tooltip attached to it, which I use to display special ... The TreeView control has a basic behaviour that once a TreeNode text ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Tooltip in TreeView control
    ... Claes Bergefall wrote: ... I have a TreeView control in my project ... I also have a tooltip attached to it, which I use to display special ... The TreeView control has a basic behaviour that once a TreeNode text ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Tooltip in TreeView control
    ... I have a TreeView control in my project ... I also have a tooltip attached to it, which I use to display special ... The TreeView control has a basic behaviour that once a TreeNode text ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Tooltip in TreeView control
    ... I have a TreeView control in my project ... I also have a tooltip attached to it, which I use to display special ... The TreeView control has a basic behaviour that once a TreeNode text ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Tooltip text in treeview control
    ... :> There is only one tooltip per treeview, but you can use the node Tag ... :> Private Sub TreeView1_MouseMove(Button As Integer, Shift As Integer, x ... :> Please respond only to the newsgroups so all can benefit. ... :>: I need to add tooltip text for each node in treeview control. ...
    (microsoft.public.vb.controls)