I have a main chart with about 10 traces that capture live data. There's an option to capture that chart - which basically clones it and copies it to another panel. On this capture panel, there are 2 Cursor Tools.
When i first implemented the cursorTools, they worked fine, then out of no where the cursors that appear when you mouse over the lines stopped showing. I had no idea what caused it since i didn't changed the code. I then just remade the class, added everything to it again and it work just fine. Now again, they stopped working. The lines still show up, you can move them, etc. but the cursors that appear when you mouse over the lines do not show up.
CursorTool
Re: CursorTool
Here's the code:
Code: Select all
private CursorTool tool1, tool2;
...
tool1 = new CursorTool(this.getChart());
tool1.setStyle(CursorToolStyle.HORIZONTAL);
tool1.getPen().setColor(Color.YELLOW);
tool1.setActive(false);
tool1.addCursorListener(new CursorTool.CursorListener() {
public void cursorMoved(CursorEvent e)
{
....
}
});
...
//Another class class enables or disables them
public void enableCursorTools()
{
tool1.setActive(true);
}
public void disableCursorTools()
{
tool1.setActive(false);
}
Re: CursorTool
Hi Turc,
If you activate your cursor tools, I don't see any reason why they can't work fine.
Here is the code I'm using and the tools seem to work fine:
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
If you activate your cursor tools, I don't see any reason why they can't work fine.
Here is the code I'm using and the tools seem to work fine:
Code: Select all
private com.steema.teechart.styles.Points points1;
private com.steema.teechart.tools.CursorTool tool1, tool2;
private void initChart() {
tChart1.getAspect().setView3D(false);
points1 = new com.steema.teechart.styles.Points(tChart1.getChart());
points1.fillSampleValues(10);
tool1 = new com.steema.teechart.tools.CursorTool(tChart1.getChart());
tool1.setStyle(com.steema.teechart.tools.CursorToolStyle.HORIZONTAL);
tool1.getPen().setColor(com.steema.teechart.drawing.Color.YELLOW);
tool1.addCursorListener(new com.steema.teechart.tools.CursorTool.CursorListener() {
public void cursorMoved(com.steema.teechart.tools.CursorTool.CursorEvent e)
{
}
});
tool2 = new com.steema.teechart.tools.CursorTool(tChart1.getChart());
tool2.setStyle(com.steema.teechart.tools.CursorToolStyle.VERTICAL);
tool2.getPen().setColor(com.steema.teechart.drawing.Color.BLUE);
}
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: CursorTool
The code for the CursorTools were never changed after they were implemented - and worked. I did however add code to that class (CapturedChart) and the main class where the CapturedChart gets its chart from, but why would any of that affect the cursor tools?
I made a simple program and the cursortools worked - as in the cursor appears on top of the line, but on my main program, the lines appear but the cursors still DO NOT appear when i mouse over them.
I made a simple program and the cursortools worked - as in the cursor appears on top of the line, but on my main program, the lines appear but the cursors still DO NOT appear when i mouse over them.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: CursorTool
Hi Turc,
Thanks in advance.
This is impossible for us to predict without knowing what changed in that class. Can you reproduce the problem with the code snippet Yeray posted?Turc wrote:The code for the CursorTools were never changed after they were implemented - and worked. I did however add code to that class (CapturedChart) and the main class where the CapturedChart gets its chart from, but why would any of that affect the cursor tools?
If the problem persists, could you please attach a simple example project we can run "as-is" to reproduce the problem here using the binary release of TeeChart?Turc wrote:I made a simple program and the cursortools worked - as in the cursor appears on top of the line, but on my main program, the lines appear but the cursors still DO NOT appear when i mouse over them.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |