TextStyleAdd()
Category: Text Formatting
Syntax: TextStyleAdd ( text; style(s) ) |
Parameters:
textAny text string or expression that returns a text string.
styleAny named style or list of styles separated by a plus (+) sign, or an integer that represents a combination of styles. Named styles should not be placed in quotation marks and cannot be passed as field contents.
Data type returned: Text
Description:
Returns a text string that has the specified style(s) applied to it.
The style names are reserved keywords in FileMaker Pro and should not be placed within quotes. You also cannot place a keyword in a field and use the field as the style parameter within TextStyleAdd(). Styles can be specified as local variables within Let functions.
All the style names have numeric equivalents that you can use instead of the names. To combine multiple styles, simply add the numeric equivalents together. The numeric equivalent can be specified by a field, so use this method if you need to dynamically specify a text style.
The list of styles and their numeric equivalents is shown in Table 6.2:
Examples:
Function | Results |
---|---|
TextStyleAdd ("word underline."; WordUnderline) | Returns word underline. |
TextStyleAdd ("bold italic!"; bold+italic) | Returns bold italic!. |
TextStyleAdd ("Plain text"; Plain) | Removes all styles from the text. If the "Plain" style is combined with any other styles, "Plain" is ignored. |
Категории