FormComboBoxControl.backgroundColor Method [AX 2012]

Gets or sets the background color of the control.

public int backgroundColor([int value])

Run On

Client

Parameters

value
Type: int
The value to assign as the background color of the control; optional. This can be one of the values from the control’s color scheme or a Winapi::RGB2int value.

Return Value

Type: int
An integer that contains a packed RGB color.

The integer that is returned contains the RGB color as follows:

  • The low-order byte contains a value for the relative intensity of red.

  • The second byte contains a value for green.

  • The third byte contains a value for blue.

  • The high-order byte must be 0 (zero).

  • The maximum value for a single byte is 255.

The following example shows how to return and set the background color for a control.

// Retrieve the existing background color. 
info (strfmt("Background color: %1", this.backgroundColor())); 
// Set the background color. 
this.backgroundColor(WindowsPalette::DarkShadow3D);

Community Additions

ADD
Show: