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

Syntax

Public Function ObjectSetText(chartID As Long, name As String, font_Size As Integer, Optional font As String = "", Optional text_color As Long = 0) As Boolean

This function is used to change the text property for the text object and label object.

Parameters

Key Description
chartID Chart identifier, 0 mean the current chart,value of type Long.
name Object key value of type String.
font_Size Font size,value of type Integer.
font Font type name , Optional value of type String.
text_color One of RGB color value ,Optional value of type Long.

Return value

Returns true if result successful. Otherwise, it returns false. To get the detailed error information, call GetlastError() function.

Sample

Dim objText

Dim objID

Dim fontSize

Dim XPos

Dim YPos

Public Sub main()

fontSize = 15

objColor = RGBColor(50,50,100)

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

AlertMessage "Please select an account first" 

Else

objID = "lblText" ' ID of the label 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

ObjectSetText 0, CSTR(objID),CINT(fontSize),,CLNG(objColor) ' Sets the label properties.

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