Reference > TDBNumber Control > TDBNumber Control Properties > DisplayText Property (TDBNumber) |
DisplayText Property (TDBNumber)
The DisplayText property returns the text displayed in the control, which is formatted using the DisplayFormat property. This property differs with the Text property, which uses the Format property.
TDBNumber.DisplayText
Read-only at run time. Not available at design time.
In the example below, the DisplayText property returns “$ (12,345,678.56)” and the Text property returns “(12345678.56)”.
TDBNumber.Format = "########.##;(########.##)"
TDBNumber.DisplayFormat = _
"$ ##,###,###.##;$ (##,###,###.##);Zero;Null"
TDBNumber.Value = "-12345678.567"
If a zero-length string is set to the DisplayText property, the format set to the Format property will be applied to the displaying format.
See Also