Knowledgebase:
CreateObjectLabel
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 06 July 2017 02:08 PM

Syntax

Public Function CreateObjectLabel(chart_ID As Long, nwin As Long, name As String, XPos As Long, YPos As Long, text As String) As Boolean

This function is used to create label object on the chart at specific position.

Parameters

Key Description
chart_ID Chart identifier, 0 is the current chart ,value of type Long.
nwin Chart sub window, value of type Long.
name Object Key,value of type String.
XPos The X axis point ,value of type Long
YPos The Y axis point ,value of type Long.
text Label object content ,value of type String.

Return value

Returns true if the object is created. Otherwise returns false. In order to get an error, call GetLastError() function.

Sample

Dim objText

Dim objID

Dim XPos

Dim YPos

Public Sub main()

  If AccountInfoInteger(ACCOUNT_LOGIN) = -1 Then ' Check if account is selected

   AlertMessage "Please select an account first" 

  Else

 objID = "lblText" ' ID of the object

 XPos = 10 ' X position on chart

 YPos = 180 ' Y position on chart

 objText="Text goes here." ' Sets the text of the label.

 CreateObjectLabel 0,0,CSTR(objID),CINT(XPos),CINT(YPos),objText 'Creates the label with the selected parameters

End If

End Sub


See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions