WidgetGetSkinColor

Syntax

Success = WidgetGetSkinColor(Widget, Component$, Property$, *Color.Long, *Opacity.Float)

Description

Retrieves the color and opacity defined by the skin for the specified widget, component, and property. This function specifically looks for properties whose parsed value corresponds to a color definition (e.g., `background-color`, `color`, `border-color`).

Parameters

Widget
The handle of the ProGUI widget.

Component$
The name of the component part of the widget (e.g., "", "thumb").

Property$
The name of the skin property that defines the color (e.g., "background-color", "color").

*Color.Long
A pointer to a Long variable that will receive the RGB color value (format $BBGGRR). Initialized to 0.

*Opacity.Float
A pointer to a Float variable that will receive the opacity value (0.0 to 1.0). Initialized to 1.0.

Return Value

Returns #True if a valid color definition was found in the skin for the given widget, component, state, and property, and the values were written to the provided pointers. Returns #False otherwise.

Remarks

This function simplifies retrieving color values from the skin. It internally uses WidgetGetSkinData() and checks if the returned data type is #PG_Skin_Type_Color or #PG_Skin_Type_Background (extracting the color part from the background). The retrieved color and opacity depend on the widget's current state set via WidgetSetSkinState(). If the property is not found or doesn't define a color, the variables pointed to by `*Color` and `*Opacity` remain unchanged from their initial values (0 and 1.0 respectively, as set by this function before attempting retrieval).

See Also

WidgetGetSkinData, WidgetGetSkinBorder, WidgetSetSkinState, SkinSetValue

Supported OS

Windows, Linux