ITabCellStyle.LocalCustomFormat

Syntax

LocalCustomFormat: String;

Description

The LocalCustomFormat property determines format of data displayed in a table cell, considering the current regional settings.

Comments

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 a 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.

Example

To execute the example a form with a button named Button1 on it, the UiTabSheet component named UiTabSheet1 and the TabSheetBox component are required. 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:

ITabCellStyle