Using link in quickinfo markup

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Jared Phelps
Version: 4.0.0236
Avatar
Hello-
I was hoping to implement a feature where when the user hovers over a token, I show a typical quickinfo tooltip with the type and name of the variable, its current value (if in debug mode), and also I wanted to add a link to go to its declaration. I set the EditorViewMouseEventArgs.ToolTipText property in my SyntaxEditor.ViewMouseHover event and the tool tip looks great with all the info I'd expect. However, since it disappears the instant the user moves off the token, clicking the link is impossible. What would be the recommended way to get the functionality I'm after?

Thanks!
Jared

Comments (7)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
This one is a little tricky. In terms of mouse interaction with the QuickInfo, there are three places:
1) OnMouseHover
2) OnMouseMove
3) OnMouseLeave

It seems like you would need to turn off the OnMouseMove and OnMouseLeave portions. The problem with turning off OnMouseLeave is that if you move outside of the SyntaxEditor control then the quick info would still stay up. If we leave the OnMouseLeave code in place then it doesn't hide the quick info until you move the mouse over the quick info (since it's a different window than SyntaxEditor).

So with those things in mind, I'm not sure what the best way to handle this is. Any ideas?


Actipro Software Support

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Good news, I was able to find a workaround for the mouse leave issue described above. So the next maintenance release will have this new feature:

Added the IntelliPromptQuickInfo.HideOnMouseMove property, which when false will not hide the quick info until the mouse hovers over another part of the SyntaxEditor or leaves the SyntaxEditor control or quick info tip.


Actipro Software Support

Posted 18 years ago by Jared Phelps
Avatar
Awesome, I look forward to giving it a try. I'm not sure what you mean by "another part of the syntaxeditor control?" Do you mean any other token other the one we're interested in, or do you mean margins, gutters, etc?

My own best guess would have been to introduce a small delay between moving off the token and hiding the quickinfo, giving the user enough time to get onto the quicklink. But if your fix gives the functionality I'm looking for without having to introduce that complexity, I couldn't be happier.

Thanks!
Jared
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes, that means if the mouse hovers (with delay) over another part of the editor like a token or column, etc.

I think the new property handles your scenario perfectly. As long as the end user moves the mouse to the quick info tip without stopping and hovering, it will work great.


Actipro Software Support

Posted 18 years ago by Jared Phelps
Avatar
OK Great I look forward to giving it a try. Thanks!

Jared
Posted 18 years ago by Jared Phelps
Avatar
Hmmmm...That's definitely the UI effect I was after, but the SyntaxEditor.IntelliPromptTipLinkClickEventHandler was never fired. Does it work for you?

I suspect that the code to hide the tip on mouse click is interfering with the code to fire the event on link click.

Thanks!
Jared
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thanks it looks like a LostFocus handler was closing the tip before the link click could process. This is resolved in the next maintenance release for when HideOnMouseMove is false.


Actipro Software Support

The latest build of this product (v24.1.0) was released 5 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.