Page 1 of 1

Text no longer resizing with zoom change in vers 8.07

Posted: Wed Jul 28, 2010 4:41 pm
by 10049920
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

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

Posted: Thu Jul 29, 2010 11:20 am
by yeray
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?

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

Posted: Thu Jul 29, 2010 2:05 pm
by 10049920
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;

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

Posted: Mon Aug 02, 2010 11:08 am
by yeray
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.

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

Posted: Mon Aug 02, 2010 4:01 pm
by 10049920
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.

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

Posted: Mon Aug 02, 2010 4:39 pm
by yeray
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.