Page 1 of 1

Disappearing lines

Posted: Wed Jun 19, 2013 5:08 pm
by 17466268
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

Re: Disappearing lines

Posted: Tue Jun 25, 2013 2:04 pm
by yeray
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.