Promotic
WikipediaLinkedInYoutubeTwitterFacebook

FindTrend - method of object TrendsView

Description:
Searching the tvTrend type trend-object according to specified parameters, for example the defined position.
Syntax:
FindTrend(nType As Long, vPar1 As Variant, vPar2 As Variant) As Long
Calling:
nTrend = oTView.FindTrend(nType, vPar1, vPar2)
Parameters:
nType(Long) The trend search method
10 - the trend progression is searched (i.e. the tvTrend type object) closest to the defined position X, Y, the position is defined with regard to the upper left edge of the trend panel (this panel is delimited by scales)
vPar1(Variant) the search parameter. If nType is set to 10, then X coordinate inside the chart panel is entered with regard to the upper left edge of the chart panel (delimited by scales)
vPar2(Variant) the search parameter. If nType is set to 10, then Y coordinate inside the chart panel is entered with regard to the upper left edge of the chart panel (delimited by scales)
Return Values:

If the trend has been found, then it returns the trend order (index) in the etrend list (see Trends, the first trend in the list has index 0).

If it has not been found, then it returns -1.

Note:

The method is used only if the graphic mode is set.

Example:
It is usefull to use it in the onMouseArea event, when the trend is activated by clicking the mouse (on the trend progress), see Example2 of this event.
PROMOTIC 8.3.27 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice