0
votes

is it possible that tooltip will locate in textindex and not in mouse cursor?

note im working tooltip in text in windows form.

here's my sample tooltip:

 toolTip1.AutoPopDelay = 5000;
        toolTip1.InitialDelay = 1000;
        toolTip1.ReshowDelay = 500;
        //toolTip1.ShowAlways = true;
        toolTip1.ToolTipTitle = "<)( Text ToolTip )(>";
        toolTip1.UseFading = true;
        toolTip1.UseAnimation = true;

parameter:

 for (int i = 0; i < keywords.Length; i++)
            {
                if (keywords[i] == token)
                {
                    // Apply alternative color and font to highlight keyword.        
                    HighlighType.keywordsType(rtb);

                        toolTip1.Show("this is a keyword", rtb); //&
                        break;
                }
            }

when a keyword will be type in richtextbox, something like for example "as" ,tooltip will appear but in a MOUSEcursor only , i want it near textindex .

is that possible? thanks a lot!

1
it's easier that you search for something already implemented out there (seems not so easy topic). - Tigran
its just becoming hard sir because tooltip was for tools but i make it for text just like in actual code-editor - Elegiac
just like this sir: codeproject.com/Articles/464085/… but i dunno what specifically event he use, if its a mousemove or what .and how to do it when you mouseover it on text :/ .sorry newbie here :( - Elegiac
anyone? pls ? .......... - Elegiac

1 Answers

0
votes

you need to combine ToolTip.Show (String, IWin32Window, Point) Method with GetPostitionFromCharIndex

so you get the Point of the text from GetPostitionFromCharIndex and pass it to the ToolTip.Show