Page 1 of 1

Cross box in TTree

Posted: Wed Apr 01, 2015 9:35 am
by 16570625
Hi

I have recently upgraded from version 8 to 2014 and I have found that the crossbox that appears in a TTree seems to be blurry. in version 8 the crosboss in the TTree component looked like a sharp +
However now it is hard to even see it is +, is there some new option I can change to get the crossBox to be sharp?

Re: Cross box in TTree

Posted: Wed Apr 01, 2015 12:10 pm
by yeray
Hello,

This is because the default Canvas changed to GDIPlus.
  • To change the Canvas in the current TTree, you have two options:
    • Open the dfm and change this:

      Code: Select all

      DefaultCanvas = 'TGDIPlusCanvas'
      for this:

      Code: Select all

      DefaultCanvas = ''
    • Call this at runtime:

      Code: Select all

      uses TeCanvas;
      
      procedure TForm1.FormCreate(Sender: TObject);
      begin
        Tree1.Canvas:=TTeeCanvas3D.Create;
      end;
  • To change the default Canvas to be used in the next Trees and Charts you'll create, you can drop a temporal TChart into a form, follow the instructions here, and then you can remove the TChart.

Re: Cross box in TTree

Posted: Wed Apr 01, 2015 4:09 pm
by 16570625
Thanks for that. I had been looking for that for awhile. I have also found that the cross still doesn't look right so I changed tmpExtra to be 1 in the method TTreeNodeCrossBox.Draw(...) and it all looks like it did before.