I am trying to draw 4 lines (one horizontal and 3 making a triangle) on the ScrollPagerDemo (see attached)
but after been drawn they just disappear
If I put the code in a 10000 iteration loop I can see the lines so I assume the code to draw is correct but why do the lines just disappear after the click handler exits
Also the when the lines are drawn they do not consistently appear where one would expect. The bottom fast scroll seems to mess up the location of the x,y coordinates for the lines
The lines are draw with a left or right click on the chart
Disappearing lines
Disappearing lines
- Attachments
-
- New jZip archive file.zip
- (5.02 KiB) Downloaded 953 times
Re: Disappearing lines
Hello,
I haven't been able to import the project you've attached; it seems incomplete.
Anyway, looking at the code I see you are using custom drawing techniques at the chart's mouseClicked event. Note the recommended place to use these custom drawing techniques is in the chartPainted event.
I also see you call chart1.repaint() after the drawing operations. Note as it is, this would redraw the chart without your custom drawings.
I haven't been able to import the project you've attached; it seems incomplete.
Anyway, looking at the code I see you are using custom drawing techniques at the chart's mouseClicked event. Note the recommended place to use these custom drawing techniques is in the chartPainted event.
I also see you call chart1.repaint() after the drawing operations. Note as it is, this would redraw the chart without your custom drawings.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |