CustomFormat: String;
The CustomFormat property determines the data display format in the table cell.
This property is independent on the OS regional interface settings, that is when this property value is defined, commas and spaces are used as separators for data in the cell.
The data display format is formed by reserved format codes. Codes are described in the Number Format section. Define data display format in the Russian variant of code format to correctly show while changing interface language settings of Foresight Analytics Platform. For example, the format of date display DD.MM.YYYY will be correctly displayed in any selected system interface language. At the same time the format DD.MM.YYYY will be available only in English version.
The value of this property is affected by the LocalCustomFormat property: when the user determines the value for the LocalCustomFormat property, the value is converted to the general form (ignoring the regional parameters settings) and is set to the CustomFormat property. In addition, on getting the value of the LocalCustomFormat property, it returns the value of the CustomFormat property converted to the local format according to the regional settings.
Executing the example requires a form with the Button1 button located on it, the UiTabSheet component named UiTabSheet1 and the TabSheetBox component. In the regional settings a point must be set as a decimal separator.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var Style: ITabCellStyle;
Custom, Local: String;
Begin
Style := UiTabSheet1.TabSheet.Cell(0, 0).Style;
Style.CustomFormat := "0,00";
Custom := Style.CustomFormat;
Local := Style.LocalCustomFormat;
End Sub Button1OnClick;
After executing this example the A0 cell has the following format: a number with two decimal positions. The Custom variable will contain the common template for a number, ignoring regional settings: "0,00". The variable "Local" will contain the localized (according to the regional settings) template for a number: "0.00".
See also: