Vertical Line for cursor
Vertical Line for cursor
Hi, i would like to know what would be the best optimized solution to implement a vertical bar as a cursor. I'm trying to do a data logger analyser and having an vertical bar that is draw at the x,y of my mouse. With the OnAfterDraw event, thing go well until i get a lot of data. We do logs value every 1min and sometime people want to to check a full month or more, So doing a onMouseMove with Chart.Invalidate in is very very too much hard on my CPU and my vertical bar start to lag a lot.
What came first in my mind was to do some "double buffer":
1. Get a copy of the paint result in OnAfterDraw.
2. OnMouseMove -> Draw the copy over TChart and then, draw my vertical bar.
I havent tried it, but i was wondering, since there is a lots of tools already developped, if there was a better way to do that.
Thanks again.
What came first in my mind was to do some "double buffer":
1. Get a copy of the paint result in OnAfterDraw.
2. OnMouseMove -> Draw the copy over TChart and then, draw my vertical bar.
I havent tried it, but i was wondering, since there is a lots of tools already developped, if there was a better way to do that.
Thanks again.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Vertical Line for cursor
Hi GotoXY,
Why don't you try using a cursor tool set to vertical and optionally set FastCursor = true. You could also set cursor's pen settings. Another alternative would be using a ColorBand tool.
Hope this helps!
Why don't you try using a cursor tool set to vertical and optionally set FastCursor = true. You could also set cursor's pen settings. Another alternative would be using a ColorBand tool.
Hope this helps!
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 |
Re: Vertical Line for cursor
Hi Narcis, i did try the Option 1 : Using CursorTool
Problem #1, The line is not redraw often, so if i move my mouse fast, the bar will completely disapear.
Problem #2, I presume FastCursor should solve the Problem #1, but it seems that i can't find the property either in TeeChart or TCursorTool.
Im using D2010 and TeeChart 8.06Pro
Thanks again
Problem #1, The line is not redraw often, so if i move my mouse fast, the bar will completely disapear.
Problem #2, I presume FastCursor should solve the Problem #1, but it seems that i can't find the property either in TeeChart or TCursorTool.
Im using D2010 and TeeChart 8.06Pro
Thanks again
Re: Vertical Line for cursor
Hi GoToXY,
Excuse us, the FastCursor property is only available in TeeChart for NET. In VCL it should be the same by default.
Excuse us, the FastCursor property is only available in TeeChart for NET. In VCL it should be the same by default.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Vertical Line for cursor
Seems ill be force to use my technic "double buffer" over your cursor because it dont refresh fast enough and dont look really professionnal that way. Maybe later, you will have a better Graphic handling for the cursor so it will refresh faster.
You can see what i'm talking about in this example.
You can see what i'm talking about in this example.
- Attachments
-
- CursorTools.rar
- CursorTool vs DoubleBuffer
- (9.58 KiB) Downloaded 737 times
Re: Vertical Line for cursor
Hi GoToXY,
I'm afraid I can't see any problem with the cursor tool in your application. This made me think that it could be due to a difference between your and my machine but the task manager here says that this testing application is consuming only 6MB RAM and 0~1% CPU (even moving the cursor as fast as I can).
In the other hand, ok, your lines look more professional (three vertical lines and a circle following the mouse vs a simple vertical line), but it flickers a little bit when moving while I can't see the same with our cursor tool.
I'm afraid I can't see any problem with the cursor tool in your application. This made me think that it could be due to a difference between your and my machine but the task manager here says that this testing application is consuming only 6MB RAM and 0~1% CPU (even moving the cursor as fast as I can).
In the other hand, ok, your lines look more professional (three vertical lines and a circle following the mouse vs a simple vertical line), but it flickers a little bit when moving while I can't see the same with our cursor tool.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Vertical Line for cursor
That is very intersting! Because on my machine (Quad Core 2.6) my cursor doesnt flick but yours do and on your machine its the opposite. Ill do some other test over slower machine and let you know how its doing because handling the cursor the way i do... i dont really like it.
And about the professional side, it wasnt about the design but the flickering i was getting from the CursorTool in TeeChart. Only a vertical line would be just fine if it wasnt flickering.
Thanks again Yeray
And about the professional side, it wasnt about the design but the flickering i was getting from the CursorTool in TeeChart. Only a vertical line would be just fine if it wasnt flickering.
Thanks again Yeray
Re: Vertical Line for cursor
I did other test and it seems to be happening only in Windows 7. Can you guys check out why ? So i could use your cursor tool.
Thanks a lot
Thanks a lot
Re: Vertical Line for cursor
Hi GoToXY,
Please, be patient, we haven't forgotten you. If you are looking for priority support you you may be interested in knowing of our Pro-Support service:
http://www.steema.com/licensing/support
Please, be patient, we haven't forgotten you. If you are looking for priority support you you may be interested in knowing of our Pro-Support service:
http://www.steema.com/licensing/support
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Vertical Line for cursor
I im very sorry, i was used to the 1 day reply from ur support. I wont do any other bump next time and be patient
Thanks again
Thanks again
Re: Vertical Line for cursor
Hi GoToXY,
We've investigated this but couldn't find the difference between both systems that could affect this behaviour.
What we've seen is that with the latest drivers available (in our case NVIDIA v197.13) the difference between using Cursor Tool and your lines isn't very significant. The Cursor Tool still seems to work better in XP while your tool seems a little bit better for Win7. But note that the difference is almost inappreciable, even multiplying x10 the number of points.
We've investigated this but couldn't find the difference between both systems that could affect this behaviour.
What we've seen is that with the latest drivers available (in our case NVIDIA v197.13) the difference between using Cursor Tool and your lines isn't very significant. The Cursor Tool still seems to work better in XP while your tool seems a little bit better for Win7. But note that the difference is almost inappreciable, even multiplying x10 the number of points.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Vertical Line for cursor
I have tested it over many video card (ATI,nVidia, onboard Intel) in Win7, i always got flickering with the CursorTool and even when Zooming (the rectangle of the zoom area is flickering a lot too). Can you add this to the wish list please.
Thanks a lot.
BTW: did you guys planned a new version with D2D ? So we could have cool animation in TeeChart ?.
Thanks a lot.
BTW: did you guys planned a new version with D2D ? So we could have cool animation in TeeChart ?.
Re: Vertical Line for cursor
Hi GoToXY,
Of course, done (TV52014780).GoToXY wrote:I have tested it over many video card (ATI,nVidia, onboard Intel) in Win7, i always got flickering with the CursorTool and even when Zooming (the rectangle of the zoom area is flickering a lot too). Can you add this to the wish list please.
We've made some tests with D2D but it's too soon to announce even if it is going to be feasible or not.GoToXY wrote:BTW: did you guys planned a new version with D2D ? So we could have cool animation in TeeChart ?.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |