Enabling and Disabling Pens

<< Click to Display Table of Contents >>

 

Enabling and Disabling Pens

The following example shows how to enable or disable Pen's data connection on an E3Chart, according to the following procedures.

1.Create an E3Chart on a Screen.

2.Open 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 Command Button, type "Disable Pen" in its Caption property.

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.Disconnect()
End Sub

 

5.On the second Command Button, type "Enable Pen" in its Caption property.

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.Connect()
End Sub

 

7.Execute this project and check its results.

Was this page useful?