IVisStyleProvider.PaletteBorderColors

Syntax

PaletteBorderColors(PaletteID: String): Array;

Parameters

PaletteID. Palette identifier.

Description

The PaletteBorderColors method is used to get an array of main border colors by palette identifier.

Comments

To get an array of strings with identifiers of alternative palette sets, use the IVisStyleProvider.PaletteIDs method.

Example

Executing the example requires a form that contains the ComboBox component with the ComboBox1 identifier, the UiTabSheet component with the UiTabSheet1 identifier and the TabSheetBox component with the TabSheetBox1 identifier. Specify UiTabSheet1 as a data source for the TabSheetBox1 component. The ComboBox1 component contains a list of styles.

The example is a handler of the OnChange event for the ComboBox1 component.

Add a link to the Drawing system assembly.

Sub ComboBox1OnChange(Sender: Object; Args: IEventArgs);
Var
    sp: IVisStyleProvider;
    TabSheet: ITabSheet;
    count, i, Index: Integer;
    Item:  String;
    BorderColor: Array Of Integer;
Begin
    sp := New VisStyleProvider.Create;
    TabSheet := UiTabSheet1.TabSheet;
    Index := ComboBox1.ItemIndex;
    Item := ComboBox1.Items.Item(Index);
    BorderColor := sp.PaletteBorderColors((Item="default")?"":Item);
    For i := 0 To sp.PaletteIDs.Length-1 Do
        TabSheet.Cell(i,count).Style.BorderColor(TabBorder.Outline) := GxColor.FromValue(BorderColor[i]*-1);
    End For;
    count := count + 1;
End Sub ComboBox1OnChange;

When the style is selected in the ComboBox1 drop-down list, table sheet cells are filled according to the selected style.

See also:

IVisStyleProvider