LocalCustomFormat: String;
The LocalCustomFormat property determines format of data displayed in a table cell, considering the current regional settings.
The data format is formed using reserved format codes. Codes are described in the Number Format section. Separators that are selected in the current regional settings should be used to specify format.
Changing the value of the LocalCustomFormat property leads to changing the value of the CustomFormat property. When the user determines value for the LocalCustomFormat property, it is converted to common form (ignoring regional settings) and is set into the CustomFormat property. When the value of the LocalCustomFormat property is obtained, it returns the value of the CustomFormat property, converted to localized format.
Executing the example requires a form with the Button1 button located on it, the UiTabSheet component named UiTabSheet1 and the TabSheetBox component. In 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.LocalCustomFormat := "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 Local variable will contain the localized (according to the regional settings) template for a number: "0.00".
See also: