Chart Preview

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

Chart Preview

Post by ibauer » Thu Apr 12, 2007 1:56 pm

Hi,

I'd like to ask one question regarding the TeeChart preview form which is located in TeePrevi unit (TeeChart Pro 7.07). What is the difference, from the functionality point of view, between "Reset Margins" button and "Proportional" checkbox? Both seem to do the same (reset the print margins to their default values before the preview form has been displayed) and hence they appear redundant to me. Or am I mistaken in my assumption?

Thanks!
Ivo Bauer [OZM Research]

ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

Post by ibauer » Mon Apr 16, 2007 8:23 am

Anyone, please?
Ivo Bauer [OZM Research]

ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

Post by ibauer » Fri May 04, 2007 11:46 am

Pretty please.
Ivo Bauer [OZM Research]

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon May 07, 2007 6:09 pm

Hi Ivo,

sorry for delay !

It does not do the same, the reset margins button will reset the margins to old values that have been set before, and checking the "Print proportional" checkbox will change the margins according to the paper dimensions in order to print proportionally.
To check and see the difference just place a ChartPreviewer component into the form and use the following code :

Code: Select all

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Chart1.PrintMargins := Rect(5,7,7,5);
Chart1.PrintProportional := False;
Chart1.PrintResolution := -70;
ChartPreviewer1.Chart := Chart1;
ChartPreviewer1.Execute;
end;
Pressing the button the Preview will show the Chart with custom margins, if you then modify the left margin for example (increasing it), and then click over the "Reset margins" button you will notice that the old margins have been set again (the custom), instead of proportional margins which will be set checking the "Print proportional".

ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

Post by ibauer » Mon May 07, 2007 8:51 pm

Hi Pep,

many thanks to you for your precise explanation. It was very helpful.

However, I noticed something strange while following your example. When you change an arbitrary margin via corresponding spin edit control, the Reset Margins button gets enabled as expected, whereas if you try to change one of the margins by dragging with the mouse, the Reset Margins button remains disabled. Could you please explain why?
Ivo Bauer [OZM Research]

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue May 08, 2007 10:07 am

Hi Ivo,

yes, you're correct, this seems to be a bug, it should change to "enabled" changing the margins with mouse. It has been fixed into the next TeeChart Pro v8 sources.

ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

Post by ibauer » Tue May 08, 2007 10:14 am

Thanks for confirmation. It's nice to hear that this bug has already been solved in the forthcoming v8. Can't wait to get my hands on it.
Ivo Bauer [OZM Research]

Post Reply