TextColor()

Category: Text Formatting

Syntax: TextColor ( text; RGB ( red; green; blue ) )


Parameters:

textAny text string or expression that returns a text string.

RGB (red;green;blue)A function that accepts three parameters from 0 to 255 and returns a number representing a color. See the RGB() definition.

Data type returned: Text

Description:

Returns the text string in the color specified by the RGB parameter. Use the TextColor() function within text expressions to emphasize words:

 "We will have " & TextColor (NumberItems;RGB (255;0;0)) & " errors per cycle.
 Unacceptable!"


TextColor() can also be used for conditional text formatting. The following calculation highlights losses in red:

 Let (Profit = GetAsText (Earnings Expenditures);
 Case (
 Profit > 0; TextColor (Profit; RGB(0;0;0));
 Profit < 0; TextColor (Profit; RGB(255;0;0));
 "")
 )


If a field is formatted in the Number Format dialog, some options override the TextColor() function. For example, conditional color for negative numbers overrides TextColor, unless the user has clicked into the field being formatted.

Examples:

Function

Results

TextColor ("this text will be blue"; RGB (0;0;255))

Returns this text will be blue, formatted in blue.

TextColor ("this text will be red"; 16711680)

Returns this text will be red, formatted in red.








FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net