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
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
> actually, I already have tootip1 as created like you describe.
>
[quoted text clipped - 12 lines]
>> properties(eg: a button) and set " eg: tooltip on tooltip 1" property
>> text what you want.
GS - 27 Dec 2007 16:20 GMT
thank you for the example code. I will give it a shot later after finishing
up the main functionalities.
I assume mob is the mouse object right?
> 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
[quoted text clipped - 32 lines]
> >
> > "kimiraikkonen" <kimiraikkonen85@gmail.com> wrote in message
news:33827c63-c882-4813-b7e5-e3fda64a7ce4@p69g2000hsa.googlegroups.com...
> >> On Dec 26, 8:42 pm, "GS" <gsmsnews.microsoft.co...@msnews.Nomail.com>
> >> wrote:
[quoted text clipped - 3 lines]
> >> properties(eg: a button) and set " eg: tooltip on tooltip 1" property
> >> text what you want.
Leon Lambert - 28 Dec 2007 12:37 GMT
No mob actually stand for Mobile Object. These are points of interest on
my map control.
Leon Lambert
> thank you for the example code. I will give it a shot later after finishing
> up the main functionalities.
[quoted text clipped - 49 lines]
>>>> properties(eg: a button) and set " eg: tooltip on tooltip 1" property
>>>> text what you want.
GS - 30 Dec 2007 03:15 GMT
Great. I finally got around to try out your hint. thanks to your hint..
It turns out to be real easy, nothing complicated for listbox nor textbox
controls
just add another tootip
in the control's hover event
ToolTip tt = toolTip2;
tt.SetToolTip(regexOptionListBox,
regexOptionListBox.Tag.ToString());
tt.AutomaticDelay = 0;
tt.Active = true;
for a simplified example.
To make tt context sensitive to selected listbox , I will have to use the
selected value for setToolTip accordingly instead of the tag.
I also found out
ToolTip tt = toolTip2;
is critical as direct use of toolTip2.SetToolTip(...) is not acceptable!
> 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
[quoted text clipped - 32 lines]
> >
> > "kimiraikkonen" <kimiraikkonen85@gmail.com> wrote in message
news:33827c63-c882-4813-b7e5-e3fda64a7ce4@p69g2000hsa.googlegroups.com...
> >> On Dec 26, 8:42 pm, "GS" <gsmsnews.microsoft.co...@msnews.Nomail.com>
> >> wrote:
[quoted text clipped - 3 lines]
> >> properties(eg: a button) and set " eg: tooltip on tooltip 1" property
> >> text what you want.