4D v13.4OBJECT GET STYLED TEXT ATTRIBUTES |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
OBJECT GET STYLED TEXT ATTRIBUTES
OBJECT GET STYLED TEXT ATTRIBUTES
The OBJECT GET STYLED TEXT ATTRIBUTES command is used to recover the current value of a style attribute in a selection of text of the form object(s) designated by object. If you pass the optional * parameter, this indicates that the object parameter is an object name (string). During execution, if the object has the focus, the command returns information about the object being edited; however, when the object does not have the focus, the command returns information about the data source (field or variable) of the object. The startSel and endSel parameters are used to designate the text selection of the object from which the style attribute is to be read. Pass the position of the first character of the selection in startSel and the position plus one of the last character of the selection in endSel. You can pass 0 in endSel to designate automatically the last character of the text (pass 1 in startSel to designate the first character of the text). Pass the name of the attribute to get in the attribName parameter and pass a variable which must recover the current value of the attribute in the attribValue parameter. To specify the attribName parameter, you must use one of the constants of the Multistyle Text Attributes theme.
You can pass as many attribute/value pairs as you want. If the value of the attribName attribute is the same for all of the selection, it is returned in attribValue. If this value is different or if object does not contain SPAN tags, the following values are returned:
After this command is executed, the OK variable is set to 1 if no error occurred; otherwise, it is set to 0. This is the case more particularly when style tags are not evaluated properly (incorrect or missing tags). In the case of an error, the variable is not changed. When an error occurs on a variable when text is being evaluated, 4D transforms the text into plain text; as a result, the <, > and & characters are converted into HTML entities. |
PROPERTIES
Product: 4D
INDEX HISTORY
Created: 4D v12 SEE ALSO
OBJECT SET STYLED TEXT ATTRIBUTES TAGS multi-style, multistyle, multi style*** |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||