Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 08 September 2020 07:21 AM


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 a label object on the chart at a specific position.


Key Description
chart_ID Chart identifier, 0 is the current chart, the value of type Long.
nwin Chart subwindow, the value of type Long.
name Object Key, the value of type String.
XPos The X-axis point, the value of type Long
YPos The Y-axis point, the value of type Long.
text Label object content, the 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.


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" 


 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))
Not helpful

Comments (0)
Post a new comment
Full Name:
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