Difference between revisions of "Text GetAttribute"

From MultiCharts
Jump to navigation Jump to search
m (Reverted edits by 176.8.90.7 (talk) to last revision by JoshM)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Returns a logical value indicating the setting for an attribute of a text object with the specified ID number; returns a value of [[True]] if the attribute is set to on, and a value of [[False]] if the attribute is set to off or if the specified object ID number is invalid.  
+
Returns a logical value indicating the setting for an attribute of a text object with the specified ID number.
  
The settings of the following attributes can be returned: border, bold, italic, strike-out, and underline.  
+
Text_GetAttribute returns a value of '''True''' if the attribute is set to on, and a value of '''False''' if the attribute is set to off or if the specified object ID number is invalid.  
 
==== Usage ====
 
<syntaxhighlight>Text_GetAttribute(ObjectID,Attribute)</syntaxhighlight>
 
  
==== Parameters ====
+
The settings of the following attributes can be returned: border, bold, italic, strike-out, and underline. 
[[ObjectID]] - a numerical expression specifying the object ID number
 
  
[[Attribute]] - a numerical expression specifying the attribute:
+
== Usage ==
 +
<syntaxhighlight>Text_GetAttribute(ObjectID, Attribute)</syntaxhighlight>
  
0 - border
+
== Parameters ==
 +
:'''ObjectID''' - a numerical expression specifying the object ID number.
  
1 - bold
+
:'''Attribute''' - a numerical expression specifying the attribute:
  
2 - italic
+
::'''0''' - border
  
3 - strike-out
+
::'''1''' - bold
  
4 - underline
+
::'''2''' - italic
  
==== Notes ====  
+
::'''3''' - strike-out
An object-specific ID number is returned by [[Text_New]] when the text object is created.  
+
 
+
::'''4''' - underline
==== Example ====
+
 
 +
== Notes ==
 +
* An object-specific ID number is returned by [[Text_New]] when the text object is created.
 +
* Use [[Text_SetAttribute]] to set the attribute for a text object.
 +
 
 +
== Example ==
 
Assign a true/false value, indicating the setting of "bold" attribute for the text object with an ID number of 3, to Bold variable:  
 
Assign a true/false value, indicating the setting of "bold" attribute for the text object with an ID number of 3, to Bold variable:  
  
<syntaxhighlight>Variable:Bold(False);  
+
<syntaxhighlight>Variable: Bold(False);  
Bold=Text_GetAttribute(3,1);</syntaxhighlight>  
+
 
 +
Bold = Text_GetAttribute(3,1);</syntaxhighlight>  
  
 
[[Category:Text Drawing]]
 
[[Category:Text Drawing]]

Latest revision as of 13:12, 13 February 2012

Returns a logical value indicating the setting for an attribute of a text object with the specified ID number.

Text_GetAttribute returns a value of True if the attribute is set to on, and a value of False if the attribute is set to off or if the specified object ID number is invalid.

The settings of the following attributes can be returned: border, bold, italic, strike-out, and underline.

Usage

Text_GetAttribute(ObjectID, Attribute)

Parameters

ObjectID - a numerical expression specifying the object ID number.
Attribute - a numerical expression specifying the attribute:
0 - border
1 - bold
2 - italic
3 - strike-out
4 - underline

Notes

  • An object-specific ID number is returned by Text_New when the text object is created.
  • Use Text_SetAttribute to set the attribute for a text object.

Example

Assign a true/false value, indicating the setting of "bold" attribute for the text object with an ID number of 3, to Bold variable:

Variable: Bold(False); 

Bold = Text_GetAttribute(3,1);