Syntax
Value$ = SkinGetValue(Path$, State$, Component$, Property$, Skin=#Null)
Description
Retrieves the raw string value associated with a specific skin property for a given selector path, state, and component directly from the skin definition. This function does not involve the skin cache or computed styles.
Parameters
Path$
The widget class selector path (e.g., "window.button", "mylistview"). Can
include a theme prefix (e.g., "dark:button").
State$
The widget state (e.g., "", "hover", "active"). An empty string targets
the base state.
Component$
The specific component within the widget (e.g., "", "thumb"). An empty
string targets the main element.
Property$
The name of the skin property whose raw value is to be retrieved (e.g.,
"background-color", "border-width").
Skin (optional)
The handle of the skin object to query. If #Null,
the current default skin is used. Default is #Null.
Return Value
Returns the raw string value exactly as it was defined (e.g., using SkinSetValue() or loaded from a file) if the specific path/state/component/property combination exists in the skin. Returns an empty string ("") otherwise.
Remarks
This function directly accesses the stored skin rules without applying any inheritance, computation, or caching. It's useful for inspecting the exact definition stored in the skin object. For retrieving the *computed* value that will actually be applied to a widget (considering inheritance, themes, and current state), use functions like WidgetGetSkinData(), WidgetGetSkinColor(), etc., usually within the widget's event handler.
Example
IncludeFile "ProGUI_PB.pbi"
StartProGUI()
MySkin = CreateSkin("Example")
SkinSetDefault(MySkin)
; Define a value
SkinSetValue("button", "hover", "", "font-size", "14px")
SkinSetValue("dark:button", "hover", "", "font-size", "16px")
; Retrieve the raw value for the default theme hover state
Value1
=SkinGetValue("button","hover","","font−size")Debug"Valueforbutton:hover:"+Value1=SkinGetValue("button","hover","","font−size")Debug"Valueforbutton:hover:"+Value1
; Output: 14px
; Retrieve the raw value for the dark theme hover state
Value2
=SkinGetValue("dark:button","hover","","font−size")Debug"Valuefordark:button:hover:"+Value2=SkinGetValue("dark:button","hover","","font−size")Debug"Valuefordark:button:hover:"+Value2
; Output: 16px
; Try retrieving a non-existent property
Value3
=SkinGetValue("button","","","non−existent−prop")Debug"Valuefornon−existentprop:′"+Value3=SkinGetValue("button","","","non−existent−prop")Debug"Valuefornon−existentprop:′"+Value3
+ "'" ; Output: ''
StopProGUI()
See Also
SkinSetValue, SkinGetData, WidgetGetSkinData
Supported OS
Windows, Linux