Text no longer resizing with zoom change in vers 8.07

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
INL2
Newbie
Newbie
Posts: 22
Joined: Mon Aug 18, 2008 12:00 am

Text no longer resizing with zoom change in vers 8.07

Post by INL2 » Wed Jul 28, 2010 4:41 pm

I have an application and we recently upgraded to Delphi 2010, I updated TeeChart from 8.06 to 8.07. Now the text in the TreeShape when I draw a TTree no longer resizes when the .View3DOptions.Zoom is changed.

Any suggestions on why this happens? No code changes have been made, so is there a new setting or property I am failing to set now?

Thanks,

Steve
Attachments
zoom problem.jpg
zoom problem.jpg (65.55 KiB) Viewed 6775 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Text no longer resizing with zoom change in vers 8.07

Post by Yeray » Thu Jul 29, 2010 11:20 am

Hi Steve,

I've added it to the defect list to be revised for future releases (TV52015059).
In the meanwhile, have you tried to change the shape font size at OnZoom event?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

INL2
Newbie
Newbie
Posts: 22
Joined: Mon Aug 18, 2008 12:00 am

Re: Text no longer resizing with zoom change in vers 8.07

Post by INL2 » Thu Jul 29, 2010 2:05 pm

I tried the following but it didn't work. Do you know the problem, we purchased the Source Code, and if you can give me a fix I might be able to get it working in the TeeChart source. We are trying to get a new release out that works for Windows 7.

procedure TForm_GraphicalDispBase.SetFontSize(Sender:TTreeNodeShape);
begin
sender.Font.Size := Round(sender.Font.Size * (curZoom / 100));
//also tried the following
tttGraphic.Canvas.Font.Size := Round(sender.Font.Size * (curZoom / 100));
end;

procedure TForm_GraphicalDispBase.tttGraphicZoom(Sender: TObject);

begin
inherited;
tttGraphic.Shapes.ForEach(SetFontSize);
end;

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Text no longer resizing with zoom change in vers 8.07

Post by Yeray » Mon Aug 02, 2010 11:08 am

Hi Steve,

The code you proposed doesn't work because the OnChangedZoom event is checked before changing the Zoom internal value. At TeCanvas.pas, if you change the method:

Code: Select all

Procedure TView3DOptions.SetZoom(const Value:Double);
begin
  if FZoom<>Value then
  begin
    if Assigned(FOnChangedZoom) then FOnChangedZoom(round(Value));

    FZoom:=Value;
    Repaint;
  end;
end;
For this:

Code: Select all

Procedure TView3DOptions.SetZoom(const Value:Double);
begin
  if FZoom<>Value then
  begin
    FZoom:=Value;

    if Assigned(FOnChangedZoom) then FOnChangedZoom(round(Value));

    Repaint;
  end;
end;
The size of the font changed at OnZoom event should work fine.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

INL2
Newbie
Newbie
Posts: 22
Joined: Mon Aug 18, 2008 12:00 am

Re: Text no longer resizing with zoom change in vers 8.07

Post by INL2 » Mon Aug 02, 2010 4:01 pm

If I understand you correct, this will just make my fix work, but not fix the underlining problem.
If I have to change the source code, I would like to fix the main problem, so I don't have to do this hack for every TTree I have.

Do you have a Source Code Change that will fix the resizing text problem without any changes to my code?

Thanks for your help.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Text no longer resizing with zoom change in vers 8.07

Post by Yeray » Mon Aug 02, 2010 4:39 pm

Hi Steve,

Not right now. I'm afraid you'll have to wait until the ticket with number (TV52015059) will be closed.
I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply