How can we show the quickinfo by hovering?

SyntaxEditor for WPF Forum

Posted 15 years ago by Gustavo Guerra
Version: 9.1.0503
Avatar
Is it possible to show the QuickInfo by hovering over the token for specified amount of time, instead of having to do it explicitely?

Best Regards,
Gustavo Guerra

Comments (9)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Gustavo,

Sorry we don't have a hover event yet (WPF doesn't have mouse hover built in so we need to build one). That's on the TODO list and once that is done, we'll update our quick info sample to show integrating with mouse hovering.

In the meantime you could probably track mouse hovers yourself (or maybe even use the ToolTipOpening event) and show the appropriate quick info data based on which offset the mouse is over (documentation talks about mouse locations and converting to offsets).


Actipro Software Support

Posted 15 years ago by Gustavo Guerra
Avatar
How can I convert a mouse location to a offset? I'm not finding anything in the documentation.

Best Regards,
Gustavo Guerra
Posted 15 years ago by Gustavo Guerra
Avatar
Nevermind, I finally found it
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
There is a "Locations, Offsets, and Positions" topic in the UI Features / Editor View Features part of the documentation that helps with this.

Also the upcoming build 504 has a new hit testing feature where you pass it a Point and it gives you very detailed results about what is at that point.


Actipro Software Support

Posted 15 years ago by Gustavo Guerra
Avatar
Thanks
Posted 15 years ago by Gustavo Guerra
Avatar
I'm overriding OnToolTipOpening for the SyntaxEditor, but it isn't working very well. The problem is that when I change the text, the tooltip also needs to be changed, but setting the ToolTip property again has no effect until that tooltip is closed, and there's no way to close it.
In the properties control, I also have tooltips for the textboxes, and when the text changes I update the tooltip, but in that case there's no problem, the tooltip immediately updates.
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Gustavo,

I don't believe our code does anything whatsoever with the native WPF ToolTip at this time. So it shouldn't really be affecting any behavior by ToolTipService.


Actipro Software Support

Posted 15 years ago by Gustavo Guerra
Avatar
I'm sorry for not being clear, what I was trying to say is that using the builtin ToolTips for doing the on hover tooltip on variables like Visual Studio does won't work, because all the text is just one visual element, and after he first tooltip is shown, it won't update until you go with the mouse outside the syntax editor and then again inside.
How far away is that feature going to be in SyntaxEditor?

Best Regards,
Gustavo Guerra
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Gustavo,

Hover events will likely be one of the next few UI features we add, now that hit testing is available. In the meantime you could attach to mouse enter/leave and run a timer that resets on mouse move to simulate a hover event. Then show QuickInfo in response to that.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.