Color

Properties:

B
G
R
Type

Constructors:

Based on constituent colors
Default constructor

Description:

This can be used to define and store the color value. Color can be defined by an absolute value (by combining red, blue and green), taken from style elements or Windows palettes, or one of the web-colors can be used.
Can be used as settings values for the settings of other objects, parameters for methods, procedures or functions that have the type Color.

Availability:

Thin client, web-client, server, thick client, external connection, Mobile application (client), Mobile application (server).
Serializable. The given object may be serialized to/from XML. Can be used in attributes of managed form. The given object may be serialized to/from XDTO. The XDTO type correspoding to this object is defined in {http://v8.1c.ru/8.1/data/ui} namespace. XDTO type name: Color.

Example:

ColorOfImportantButton = New Color(255, 0, 0); // red
ColorOfUsualButton = StyleColors.ButtonBackColor;

// For the ordinary form
If ArticleBalance <= Article.Balance Then
    Controls.OrderButton.ButtonBackColor = ColorOfImportantButton;
Else
    Controls.OrderButton.ButtonBackColor = ColorOfUsualButton;
EndIf
;

// For the managed form
If ArticleBalance <= Article.Balance Then
    Items.OrderButton.BackColor = ColorOfImportantButton;
Else
    Items.OrderButton.BackColor = ColorOfUsualButton;
EndIf
;


    

1C:Enterprise Developer's Community