Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Theme_Control_GetColorIndex

  • Last UpdatedJul 18, 2023
  • 1 minute read

Returns the common control (button) color index for the specific button state. This is different from the header button. The normal state color is always light grey regardless of the theme selected.

Syntax

Theme_Control_GetColorIndex(INT nState)

nState

Indicates which state the UI element is in such that correct shade of the color is returned. This can be one of the following values:

CTRL_ITEM_STATE_Normal

0

Normal state - no mouse over

CTRL_ITEM_STATE_NormalHover

2

Mouse is hovering over control

CTRL_ITEM_STATE_NormalPressed

3

Mouse button pressed on control

CTRL_ITEM_STATE_Active

4

Item is in selected state

CTRL_ITEM_STATE_ActiveHover

5

Item is in selected and mouse is hovering

CTRL_ITEM_STATE_ActivePressed

6

Item is selected and mouse button is down

CTRL_ITEM_STATE_Disabled

1

Item is disabled

CTRL_ITEM_STATE_ActiveDisabled

7

Item is in selected AND disabled state\

Typically, this state will be returned by a function such as "Button_GetState".

Return Value

Returns an index into the color array configured on the graphics object that called this function.

Example

Theme_Control_GetColorIndex(Button_GetState(DspGetAnCur()))

Theme_Control_GetForegroundColorIndex, Theme_Header_GetBackgroundColorIndex, Theme_Header_GetColorIndex, Theme_Header_GetForegroundColorIndex, Theme_Header_GetMidColorIndex, Theme_SetTheme, Theme_ToggleButton_GetForegroundColorIndex

See Also

Public Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in