1

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.

Reron
  • 181
  • 11

2 Answers2

1

Set Chart1.BackImage to nil in order to remove it.

wp_1233996
  • 784
  • 1
  • 4
  • 12
  • thanks. I know that. But in order to return the original Backimage I've to keep it as resource and define it again. Actually that what I'm doing now, however I'm looking to understand if there is a simpler way as Visible, Hide, Show ..... – Reron Jun 29 '19 at 14:30
1

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.

Brian
  • 6,717
  • 2
  • 23
  • 31