Search code examples
delphiteechart

Is there a simple way for temporary hiding the Teechart BackImage?


I'm looking for a simple way (if exist) for temporary hiding (and then show it again) of Theechart BackImage.

Something like:

Chart1.Backimage.Visible := false; // then true

I know how to change the back image by code from a stream or file, such as:

Chart1.BackImage.LoadFromFile(<An image file name>);

But wonder if there is a simple way to do it.


Solution

  • No easy hide/show/visible etc. To hide the image you can set the style to custom and set the bounds / positions to not show anything. To bring it back set to what is was previously, for example tile and all 0's.

      Chart1.BackImage.Mode := pbmCustom;  // In the UI this is Style
      Chart1.BackImage.Left := 0;
      Chart1.BackImage.Right := 1;
      Chart1.BackImage.Top := 0;
      Chart1.BackImage.Bottom := 1;
    

    To see properties and values set things manually in the IDE design time on a form and then view the form as text to see what the properties and values are.