Hidding of Cursor (TCursorTool)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Hidding of Cursor (TCursorTool)

Post by a_const » Tue Jun 28, 2011 10:01 am

I have attached example project.
Here cursor (vertical line) and series are created in program.
I can drag this cursor by mouse.
When I select region on CH-component by mouse (press and diagonally drag, forming rectangle)
this cursor (vertical line) disappears. But mouse "feels" this cursor, changing pictogram when moves near this cursor,
we can drag invisible cursor (vertical line). When I restore former range of axis this cursor appears.
How can I aviod of disppearing this
TChTest.rar
Example of disappearing of cusor (TCursorTool)
(407.62 KiB) Downloaded 613 times
cursor?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Hidding of Cursor (TCursorTool)

Post by Narcís » Thu Jun 30, 2011 10:35 am

Hi a_const,
When I restore former range of axis this cursor appears.
I could reproduce the issue here but I'm not sure about what do you mean with this. Could you please give us more detailed information on the statement above?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Re: Hidding of Cursor (TCursorTool)

Post by a_const » Fri Jul 01, 2011 10:31 am

I'll attach video with reproduced error
Attachments
20110701_1427.rar
Video with reproduced error
(137.11 KiB) Downloaded 531 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Hidding of Cursor (TCursorTool)

Post by Narcís » Fri Jul 01, 2011 11:41 am

Hi a_const,

Thanks for the video.

I can not reproduce this here using TeeChart v2011.03.30407 VCL, which is latest release available. Which TeeChart version are you using? Can you please check if v2011.03 solves the problem at your end?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Re: Hidding of Cursor (TCursorTool)

Post by a_const » Mon Jul 04, 2011 8:18 am

I used Build 2010.01.11004.
Using Build 2011.03.30407 resolves this problem.
Thanks for advise.

a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Re: Hidding of Cursor (TCursorTool)

Post by a_const » Mon Sep 19, 2011 7:56 am

This error is reproduced with latest release TeeChart v2011.03.30407 VCL. But It occurs very seldom. You can reproduce this error using test example, which I sent earlier. You should select rectangle (by pressing left mouse button and dragging from left to right ). The rectangle left side should be to the left of the cursor. The right side of a rectangle should be to the right of the cursor, but right side must be very close to cursor. When mouse button is unpressed then cursor disappears. It is necessary to try to make it about thirty times that there was this error. I'll attach video.

a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Re: Hidding of Cursor (TCursorTool)

Post by a_const » Mon Sep 19, 2011 8:03 am

I send video.

Best regards.
Attachments
20110919_1153.rar
Video with hidden cursor.
(86.2 KiB) Downloaded 493 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Hidding of Cursor (TCursorTool)

Post by Narcís » Mon Sep 19, 2011 8:13 am

Hi a_const,

Thanks for the information. I think this is because depending on the zoom rectangle ration and its position relative to the cursor tool it is not drawn inside the chart rectangle boundaries. If you scroll the chart to the left you'll probably see it appearing again. Can you please check that?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Re: Hidding of Cursor (TCursorTool)

Post by a_const » Thu Sep 22, 2011 7:11 am

Hi Narcis.

Do you suppose that the Cursor tool is behind of zoom rectangle or bounds are wrong? Why dose mouse cursor feels the invisible cursor tool (see attached video)? I can drag invisible cursor tool. In new Example we can see current position of the cursor tool (top right corner). It confirms that the cursor tool is inside bounds. I tried scroll the chart to the left and to the right (see buttons in bottom right corner),but cursor tool stays invisible. The cursor tool becomes visible when I restore original bounds by pressing mouse button and dragging from right to left (see end of video).

Best regards.
Attachments
CursorHiding.rar
(283.35 KiB) Downloaded 537 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Hidding of Cursor (TCursorTool)

Post by Narcís » Thu Sep 22, 2011 8:25 am

Hi a_const,
Do you suppose that the Cursor tool is behind of zoom rectangle or bounds are wrong
I meant that since the zoom rectangle hardly has the same dimensions proportion as the chart bounds zoom is performed in a way that the cursor tool was left out of those bounds, that's why scrolling the chart a little bit made the cursor tool appear again.
I can drag invisible cursor tool. In new Example we can see current position of the cursor tool (top right corner). It confirms that the cursor tool is inside bounds. I tried scroll the chart to the left and to the right (see buttons in bottom right corner),but cursor tool stays invisible. The cursor tool becomes visible when I restore original bounds by pressing mouse button and dragging from right to left (see end of video).
I'm not able to reproduce this with the example you sent. I'm not sure about which action you performed to make the cursor disappear. Could you please let me know the exact steps I should follow or send another example reproducing the issue?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Re: Hidding of Cursor (TCursorTool)

Post by a_const » Mon Sep 26, 2011 11:22 am

Hi Narcis.

I send updated test project.

Best Regards.
Attachments
TChTest.rar
(8.69 KiB) Downloaded 527 times

a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Re: Hidding of Cursor (TCursorTool)

Post by a_const » Mon Sep 26, 2011 11:24 am

Hi Narcis.

I send updated new video.

Best Regards.
Attachments
20110926_1455.rar
(140.87 KiB) Downloaded 501 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Hidding of Cursor (TCursorTool)

Post by Narcís » Mon Sep 26, 2011 1:24 pm

Hello,

Thanks for your feedback but I'm still unable to reproduce the problem here. Find attached a video demonstrating it. The only problem I see is the CursorTool not refreshing when dragging it at the end of the video. Do you think I should do something different to reproduce the problem?

Thanks in advance.
Attachments
HidingCursor.zip
(263.56 KiB) Downloaded 531 times
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

a_const
Newbie
Newbie
Posts: 14
Joined: Tue Nov 30, 2010 12:00 am

Re: Hidding of Cursor (TCursorTool)

Post by a_const » Thu Sep 29, 2011 9:08 am

Hi

The problem at the end of the video is caused by the bad test application. Date label is placed on Chart component. In this application the cursor was not dragging. I attach updated test application.

I resolve problem of cursor hiding.
Using a debugger I was found out (in units TeeTools.pas and TeeEngine.pas) the following:

1. In class TCursorTool at creation of object (TCursorTool.Create) field IPoint.X and IPoint.Y are initialized in -1.

2. In method TCursorTool.RedrawCursor these fields are checked (... (IPoint.X > 0) and (IPoint.Y > 0) ...). When these fields are less or is equal 0 the cursor is not drawn. Therefore the cursor isn't visible.

3. At the moment of cursor disappearing in method TCursorTool.CalcScreenPositions field IPoint.Y is assigned negative value

IPoint.Y:=GetVertAxis.CalcPosValue(IYValue);.

4. If after this assigning line I add line of checking ( if IPoint.Y <= 0 then IPoint.Y := 1) the cursor doesn't disappear.

This solution is temporary. I hope You will pay to this attention and will make some corrections in the future versions.

Best regards.
Attachments
TChTest.rar
(8.92 KiB) Downloaded 520 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Hidding of Cursor (TCursorTool)

Post by Narcís » Thu Sep 29, 2011 10:28 am

Hi a_const,
The problem at the end of the video is caused by the bad test application.
Ok, it's working fine now.
This solution is temporary. I hope You will pay to this attention and will make some corrections in the future versions.
After testing your project for quite a long time I have been able to reproduce the issue here after zooming several times (7-10 approx.) around the cursor tool. I stripped your code down and found the problem can be reproduced with this code:

Code: Select all

uses Series, TeeTools;

procedure TForm1.FormCreate(Sender: TObject);
var Cur: TCursorTool;
begin
  Chart1.View3D:=False;

  Chart1.Axes.Bottom.SetMinMax(0, 50000);
  Chart1.Axes.Left.SetMinMax(-1e307, 1.e+308);
  Chart1.Axes.Left.Visible := False;

  Chart1.AddSeries(TLineSeries.Create(Self));

  Cur := TCursorTool.Create(Self);
  Cur.ParentChart := Chart1;
  Cur.Style := cssVertical;
  Cur.Pen.Width:=2;
end;
So I have added the issue (TV52015763) to the bug list to be investigated.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply