UserThousandSeparator: String;
UserThousandSeparator: String;
The UserThousandSeparator property sets custom thousands separator.
To set custom thorusands separator, determine data display format in the table cell using the ITabCellStyle.CustomFormat property.
To execute the example, place on the form the Button, TabSheetBox and UiTabSheet components (for Fore.NET example use the TabSheetBoxNet and UiTabSheetNet components) named BUTTON1, TABSHEETBOX1/TABSHEETBOXNET1 and UITABSHEET1/UITABSHEETNET1 respectively. For the TabSheetBox1/TabSheetBoxNet1 component, set the Source/UiSource property to UiTabSheet1/UiTabSheetNet1.
Add links to the Drawing, Tab, Forms, Forms.NET (for Fore.NET example) system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Style: ITabCellStyle;
Sheet: ITabSheet;
Range: ITabRange;
Color: IGxColor;
SolidBrush: IGxBrush;
Begin
Sheet := UiTabSheet1.TabSheet;
Range := Sheet.View.Selection.Range;
Style := Range.Style;
Style.CustomFormat:= "# ##0";
Style.UserThousandSeparator:= " ' ";
Color := GxColor.FromName("Yellow");
SolidBrush := New GxSolidBrush.Create(Color);
Style.BackgroundBrush := SolidBrush;
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Forms.Net;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Style: ITabCellStyle;
Sheet: ITabSheet;
Range: ITabRange;
Brush: GxSolidBrush = New GxSolidBrushClass();
ColorCls: GxColorClass = New GxColorClassClass();
Begin
Sheet := UiTabSheetNet1.TabSheetUi.TabSheet;
Range := Sheet.View.Selection.Range;
Style := Range.Style;
Style.CustomFormat:= "# ##0";
Style.UserThousandSeparator:= " ' ";
Brush.Create(ColorCls.FromName("Yellow"));
Style.BackgroundBrush := Brush;
End Sub;
As a result, clicking the Button1 button changes custom thousands separator in the cell, for example:
See also: