Page 1 of 1

Cursor always Visible in the exported PDF

Posted: Wed Jun 21, 2006 10:56 am
by 9333771
Hi,

I got a chart with a cursor that follows the mouse.
In the exported PDF file the cursor is always visible no matter if I hide it or not.
But I don’t have problem with jpg for example.

I hide the cursor with
ChartTool. Pen.Visible := false
(I don’t use ChartTool.Active cause I change it in OnBeforeDrawSeries.)

Can you confirm me that .Active and .Pen.Visible are distinct property?

I try to call chart.repaint before exporting: no difference.

But, I found an easy workaround: I move the cursor outside of my chart before the export.

Do you have a better solution? Is this a bug? Did I miss something?

Thanks in advance.


Precision:
I do the export at run time
In an other chart, I use ChartTool.Active to hide it and it works with PDF and JPG

Context:
winXP SP2,
TeeChart win 7.05
Delphi Architect 9.0

Posted: Wed Jun 21, 2006 11:39 am
by narcis
Hi Mariano,

I'm not able to reproduce this issue here using v7.07. Could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
I hide the cursor with
ChartTool. Pen.Visible := false
(I don’t use ChartTool.Active cause I change it in OnBeforeDrawSeries.)

Can you confirm me that .Active and .Pen.Visible are distinct property?
Yes, they are different properties. Active disables the cursor tool while Pen.Visible sets wether the cursor's pen is visible or not.

Posted: Wed Jun 21, 2006 12:03 pm
by 9333771
hi Narcís,

Well, I'm using the 7.05. Maybe that's why.

But, I just send an example on the chanel. Can you try it anyway?

thanks

Posted: Wed Jun 21, 2006 12:47 pm
by narcis
Hi Mariano,

Thanks for the example. I could reproduce the issue here and I've seen that this only happens when setting the pen to not visible and then visible again. Removing those lines works fine.

I've added the issue to our defect list (TV52011511) to be fixed for future releases.

Posted: Thu Jun 22, 2006 7:11 am
by 9333771
Hi Narcís,

So, if i understood well, I cannot hide the cursor with the Pen.Visible property? I have to use .Active. That's right?

best regards,

Posted: Thu Jun 22, 2006 8:46 am
by narcis
Hi Mariano,

Using Active you enable/disable the cursor, using Pen.Visible you only make it visible/invisible but still active.

To solve the issue you reported just don't make it's pen invisible before exporting to PDF in the example you attached.

Posted: Thu Jun 22, 2006 10:17 am
by 9333771
well,

the issue I reported was that the cursor is visible when I try to hide it. So To not hide it won't solve my problem :)

Anyway, It's not a big deal, I just move it outside of the chart before the export. So I don't see it.

thanks for your help

Posted: Thu Jun 22, 2006 10:22 am
by narcis
Mariano,

Using the code below, not hidding the cursor, when exporting the chart to PDF doesn't draw the cursor in the PDF file as it isn't with JPEG exporting.

Code: Select all

procedure TForm3.btnSaveClick(Sender: TObject);
begin
  TeeSaveToPDFFile(Chart,'Chart_WithCursor.pdf', Chart.Width, Chart.Height);
  TeeSaveToJPEG(Chart,'Chart_WithoutCursor.jpg', Chart.Width, Chart.height);
end;