Re: Tooltip in TreeView control
- From: "Claes Bergefall" <louplou@xxxxxxxxxxxxx>
- Date: Wed, 13 Sep 2006 10:44:42 -0400
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?
.
- Follow-Ups:
- Re: Tooltip in TreeView control
- From: kuchuk
- Re: Tooltip in TreeView control
- References:
- Tooltip in TreeView control
- From: kuchuk
- Tooltip in TreeView control
- Prev by Date: RE: How to tell WebBrowser control what credentials to use?
- Next by Date: Re: How to set the BackColor of a single item in ListBox
- Previous by thread: Tooltip in TreeView control
- Next by thread: Re: Tooltip in TreeView control
- Index(es):
Relevant Pages
|