The display format for a column.
You can use the GetFormat and SetFormat methods instead of Describe and Modify to get and change a column’s display format. The advantage to using Modify is the ability to specify an expression.
Column and Computed Field controls
Describe and Modify argument:
"controlname.Format { = ' value ' }"
Parameter |
Description |
---|---|
controlname |
The name of the column or computed field for which you want to get or set the display format. |
value |
(exp) A string specifying the display format. See the User’s Guide for information on constructing display formats. Value can be a quoted DataWindow expression. |
Select the control and set the value in the Properties window, Behavior category.
If you want to add text to a numeric display format and use a color attribute, you must include the escape character (\) before each literal in the mask. For example:
[red]\D\e\p\t\: ###
[Visual Basic] setting = dw1.Describe("phone.Format")
dw1.Modify( _
"phone.Format='[red](@@@)@@@-@@@@;~~~'None~~~''")