Enabling or Disabling a Pen Visualization

<< Click to Display Table of Contents >>

 

Enabling or Disabling a Pen Visualization

The following example shows how to enable or disable a Pen's visualization on an E3chart, according to the following procedures.

1.Create an E3Chart on a Screen.

2.Open this E3Chart's Properties Window and select the Pens tab. Create a new Realtime-type Pen and link it to a Demo Tag on the Vertical Axis.

3.Create two Command Buttons on this Screen. On the first one, change its Caption property to "Disable Pen Visualization".

4.Open this Command Button's Properties Window and select the Scripts tab. On the Click event, type the next script.

Sub CommandButton1_Click()
  Set Pen1= Screen.Item("E3Chart1").Pens.Item("Pen1")
  Pen1.Visible = False
End Sub

 

5.On the second Command Button, change its Caption property to "Enable Pen Visualization".

6.Open this Command Button's Properties Window and select the Scripts tab. On the Click event, type the next script.

Sub CommandButton2_Click()
  Set Pen1 = Screen.Item("E3Chart1").Pens.Item("Pen1")
  Pen1.Visible = True
End Sub

 

7.Execute this project and check its results.

Was this page useful?