It should be possible to dynamically pop up specific text in your
tooltip. I did this in a small map control i did. Basically i hooked
into the mouse move event for the control you are interested in. In the
event handler i looked to see if the tooltip was active. If active i
then analyzed where the mouse was in the control. I was able then to get
the specific information about the item that was under the mouse. You
can then set the text in the tooltip and display it. Following is the
code where i set the contents of the tool tip. It is taken out of
context but hopefully gives you the idea.
ToolTip tt = mapControl.toolTip1;
RectangleF rec = new RectangleF(x - 2,y - 2,4,4);
PointF pt = MapToScreen(mob.x,mob.y);
if (rec.Contains(pt))
{
tt.SetToolTip(mapControl, mob.TargetInfo());
tt.AutomaticDelay = 0;
tt.Active = true;
}
TargetInfo can create a pretty complex set of text. It uses a
StringBuilder to do that and you can use multiple lines of text by
Appending \n characters.
Hope this helps
Leon Lambert
GS wrote:
actually, I already have tootip1 as created like you describe.
I was attempting to set the tootip dynamically based on the scrolling/item
selected on the listbox.
I guess that is not possible, so I just gave up and set the tag instead. the
user would have to request help on the listbox 1 to see the new dynamic help
content
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:33**********************************@p69g2000 hsa.googlegroups.com...
>On Dec 26, 8:42 pm, "GS" <gsmsnews.microsoft.co...@msnews.Nomail.com>
wrote:
>>how can I set tooTip on ToolTip1 for a listbox?
If you're meaning associating a tooltip with a control, simple drag a
tooltip from toolbox on your project then go to your control's
properties(eg: a button) and set " eg: tooltip on tooltip 1" property
text what you want.