{CONDITION_BEGIN}
Syntax
Arguments
- Logical_Expression
An expression that evaluates to TRUE (.T.) or FALSE (.F.).
Description
Make portions of an Xdialog visible.
Discussion
{CONDITION_BEGIN} allows you to make portions of an Xdialog visible if a Logical_Expression is .T. This command is a variant of the {CONDITION} command, and is particularly useful when you have nested {CONDITION} statements. Each call to {CONDITION_BEGIN} adds the specified logical expression to the current "ambient" logical expression (i.e. the logical expression which controls whether the controls in an Xdialog are visible or not). The corresponding {CONDITION_END} command removes the most recently added logical expression from the current "ambient" logical expression.
Example
a = .f. b = .f. c = .f. ui_dlg_box("",<<%dlg% (a) A; {condition_begin=a} (b) B \(requires A is true); {condition_begin=b} (c) \(C requires A and B are true); {condition_begin=c} This is 3 conditions deep \(requires A, B and C are true); {condition_end} {condition_end} {condition_end} This is at the top level \(does not require that A is true); %dlg%)
Here is how the same Xdialog would be created using the older {CONDITION} command:
a = .f. b = .f. c = .f. ui_dlg_box("",<<%dlg% (a) A; {condition_begin=a} (b) B \(requires A is true); {condition=a.and.b} (c) \(C requires A and B are true); {condition=a.and.b.and.c} This is 3 conditions deep \(requires A, B and C are true); {condition=.t.} This is at the top level \(does not require that A is true); %dlg%)
Limitations
Desktop applications only
See Also