Crainiate Community

Support and discussion for users of Crainiate component software products
Welcome to Crainiate Community Sign in | Join | Help
in Search

Custom tooltip

Last post 05-21-2008 9:35 AM by Ireneusz Patalas. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-13-2008 2:49 PM

    Custom tooltip

    Hello,

    I'm currently working on an advanced tooltip control, which will replace all tooltips in our application in future and I just began to wonder how to implement custom tooltip in Crainiate component... Currently I can only set a string that will be displayed by the system tooltip, but that's not enough. My tooltip has an API very similar to the one from Windows Forms, so I have 2 main methods of invoking the tooltip: SetTooltip which attaches itself to a control (seems to be impossible in that situation, since the elements are not controls) and Show/Hide pair that can be used to show tooltip explicitly.

    The problem is that my tooltip can contain some controls that require user interaction (links for example), so I cannot hide it on OnElementLeave when the mouse moves from the element to the tooltip window, because the user won't be able to click the link.
    I would really like to avoid situation, that I will need to integrate the tooltip with Crainiate, I want to keep this component independent, but I don't have any idea how to solve that problem at the moment.

    Do you have any tips ?

    Filed under:
    • 87.105.212.19
  • 05-14-2008 11:28 PM In reply to

    Re: Custom tooltip

    Hi,

    The tooltip used is a standard system.windows.forms.tooltip object. It is attached to the Model control with text depending on the element that is under the mouse.

    Unfortuneately the tooltip is not created in a factory, but in a private method. However this could be easily changed in a future version, allowing a custom version of the tooltip control to be created instead.

    For easiest integration then, you will need to inherit from the tooltip class.

    Filed under:
    • 86.130.59.174
  • 05-20-2008 2:24 PM In reply to

    • Carl916
    • Top 10 Contributor
    • Joined on 03-30-2006
    • Knaphill, Surrey
    • Posts 21

    Re: Custom tooltip

    I managed to get the DotNetBar SuperTooltip control working the diagram elements.  I haven't quite got round to finishing off all the different tooltips for all my shapes but I'd be happy to share how I got it working.

    Regards, Carl

    • 217.37.196.9
  • 05-20-2008 3:09 PM In reply to

    Re: Custom tooltip

     In fact I managed to do it as well by handling some mouse events and manual rectangle checking (I need a possibility to mouseover from the element to the tooltip itself), but I'm still interested in your version. Maybe it's better than mine.

     For now I only handle explicit tooltips that way, but in future I plan to implement it for SetTooltip API as well, so then I will be able to bind tooltip to a specific rectangle on a control.
     

    • 87.105.212.19
  • 05-20-2008 11:31 PM In reply to

    • Carl916
    • Top 10 Contributor
    • Joined on 03-30-2006
    • Knaphill, Surrey
    • Posts 21

    Re: Custom tooltip

    Here is a link to the DotNetBar SuperTooltip.  http://www.devcomponents.com/dotnetbar/SuperTooltips.aspx  It comes with the DotNetBar component which is just over $200.

    • 87.81.186.149
  • 05-21-2008 9:35 AM In reply to

    Re: Custom tooltip

    I know that component, because I was doing a research in this topic 2 weeks ago, but unfortunately no component suited our needs, so I started to do a new one from scratch, but it's not a problem at all.

    The problem was in connecting the tooltip with Crainiate component, but I managed to do it manually for now. 

    • 87.105.212.19
Page 1 of 1 (6 items)