Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 Real-Time Graphics Tools for .Net (VB and C#)
 persistent dataToolTip
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

oliversleep

35 Posts

Posted - 25 Aug 2010 :  07:12:26  Show Profile  Reply with Quote
Hi,

I'm working with the RT component, and I'ld like to have a persistent dataToolTip when the graph update().

When I click on it, I show my toolTip, but at the next refresh it disapear and I need to click again.


DataToolTip datatooltip = new DataToolTip(chartView);
datatooltip.SetEnable(true);
chartView.SetCurrentMouseListener(datatooltip);


Or is it possible to have a dataToolTip when my mouse is over the graph (instead using a click) ?


tks !

quinncurtis

1164 Posts

Posted - 25 Aug 2010 :  13:17:55  Show Profile  Reply with Quote
Sorry, but the tool tips do not have the option you describe. When the graph is redrawn with a display update, the tooltip is removed.

Currently the data tool tips require a mouse click to trigger the tool tip display.

We are adding a "hover on" option in the DataTooltip class, which will display a tool tip without a mouse click, in the next update of the software, probably within a month. The tooltip would still be cleared in an update though. You would need to trigger an event with a mouse movement (1 pixel would do) to cause the tool tip to reappear.

If this is critical to your application you may need some sort of custom tool tip written by us. It would not cost much for our special services group to do this. Let us know if you would like a quote.

Go to Top of Page

oliversleep

35 Posts

Posted - 26 Aug 2010 :  04:31:59  Show Profile  Reply with Quote
Tks for your answer.

I think we wait for your next update.

Actually it's not possible to use a custom event to force the display of the toolTip ? (a custom toolTip, like a panel for example)
Go to Top of Page

quinncurtis

1164 Posts

Posted - 26 Aug 2010 :  10:04:26  Show Profile  Reply with Quote
I think you best bet would to just stop the display update while you have the mouse button pressed holding the tooltip open. You can still update the data in a timer thread different than the display update. That way, when you released the tooltip, the chart would refresh with no loss of data. You would just add mouse down and mouse up events to your ChartView derived class. Double click on each the two mouse events in the Events tab of the the class (RTUserControl1 in this case) property page to create the event delegates, then add the lines turning the display update timer on and off.


private void RTUserControl1_MouseDown(object sender, MouseEventArgs e)
{
// stop display update timer
timer1.Enabled = false;

}

private void RTUserControl1_MouseUp(object sender, MouseEventArgs e)
{
// start display update timer
timer1.Enabled = true;

}
Go to Top of Page

quinncurtis

1164 Posts

Posted - 26 Aug 2010 :  11:26:07  Show Profile  Reply with Quote
Or, you can create a custom tool tip class which does much the same thing. The advantage of the custom class is that you can check to see if the tool tip is active, before you shut off the display update timer. That way random mouse clicks in the graph windows do not turn off the display update momentarily.

public class RTStockDisplayUserControl1 :  com.quinncurtis.chart2dnet.ChartView
{

   class CustomToolTip : DataToolTip
   {
      RTStockDisplayUserControl1 instObj = null;

      public CustomToolTip(RTStockDisplayUserControl1 component)
                : base(component)
      {

        instObj = component;
      }

      public override void OnMouseUp(MouseEventArgs mouseevent)
      {
        if (base.TooltipActive)
           instObj.timer1.Enabled = true;
        base.OnMouseUp(mouseevent);

      }

      public override void OnMouseDown(MouseEventArgs mouseevent)
      {
        base.OnMouseDown(mouseevent);
        if (base.TooltipActive)
          instObj.timer1.Enabled = false;
      }
    }

.
.
.
.
// In main graph building routine

CustomToolTip datatooltip = new CustomToolTip(this);
datatooltip.SetEnable(true);
chartVu.SetCurrentMouseListener(datatooltip);

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07