Dynamic Text O Directive
Syntax
%O= [ B={} ] [ C = {} ] %
%O={@@}%
Arguments
- B={}
Character. Specifies background colors. Refer to Dynamic Text O Directive {B} Operator.
- C={}
Character. Specifies foreground colors. Refer to Dynamic Text O Directive {C} Operator.
- {@@}
Character. Indicates that the text has embedded formatting. Refer to Dynamic Text O Directive {@@} Operator.
Description
The O directive allows you to format dynamic text. When you have multiple directives in a Format string, you separate them with semi-colons ";".
Example
dim text as C dim formatted_text as C text = "Alpha Anywhere Can Do Colored Dynamic Text" font_color = "Dark Blue" background_color = "Win3d" flag = .t. formatted_text = "{B="+background_color+"}" + "{C="+font_color+"}" + text ui_dlg_box("Colored Text",<<%dlg% Below is an example of 'owner draw' dynamic text; {lf}; {frame=1,1} {text=%O={@@}%100,3:formatted_text?flag}; {lf}; Text: .40text!change Font color: %c%.20font_color!change; {lf}; (flag) Enable/Disable text; %dlg%,<<%code% if (a_dlg_button = "change") then a_dlg_button = "" formatted_text = "{B="+background_color+"}" + "{C="+font_color+"}" + text end if %code%)
See Also