AddDisplay

<< Click to Display Table of Contents >>

 

AddDisplay

AddDisplay([Title], [DisplayPosition])

Adds a new Display on a TrendAnalysis. The optional parameter Title indicates a title for that Display. If omitted, uses a default incremental title. The optional parameter DisplayPosition indicates the position of this Display relative to the selected Display, if TrendAnalysis is open, or relative to the last Display added, if TrendAnalysis is closed. Possible values for this parameter are -1: tadpDefault (minus one, default), 0: tadpLeft (on the left), 1: tadpRight (on the right), 2: tadpTop (on top), or 3: tadpBottom (at the bottom). The default value (-1, minus one) uses an internal calculation to define the Display's position. This method returns True if the Display was added successfully or False otherwise. The next code contains an example of this method's usage.

Sub CommandButton1_Click()
  Set TA = Application.GetTrendAnalysis("Popup")
  TA.AddPen "Data1.DemoTag1"
  TA.AddPlotArea
  TA.AddPen "Data1.DemoTag2"
  TA.AddDisplay "RightScreen", 1
  TA.AddPlotArea
  TA.AddPen "Data1.DemoTag3"
  TA.AddDisplay "BottomScreen", 3
  TA.Show
End Sub

Was this page useful?