I have revised the way of defining the background colors and text colors of the Gadgets.
These colors are transmitted now by reading the hierarchical list of Windows, Children and GrandChildren.
This hierarchical list is built once at the 1st call.
So the colors of a window or a container are automatically passed to its Children at initialization, when calling SetObjectColor.
And the Gadgets are drawn using these colors without the need to search for the parent's color. It works much better this way.
I also added the color for the ListIcon and ExplorerList Gadget column header.
Usage:
Code: Select all
SetObjectColor([#Window, #Gadget, BackColor, TextColor])
#Window | #PB_All = All Window (Default).
| The Window number to use.
|
#Gadget | #PB_All = All Supported Gadgets (Default).
| The Gadget number to use.
|
BackColor | #PB_Auto = Same as parent container's color (Default).
| The new backgound color. RGB() can be used to get a valid color value.
| #PB_Default = to go back to the default system backgound color.
|
TextColor | #PB_Auto = White or Black depending on whether the background color is dark or light (Default).
| The new text color. RGB() can be used to get a valid color value.
| #PB_Default: to go back to the default system text color.
For all gadgets with automatic background color and text color use: SetObjectColor()
Example here with the containers drawn in another color:
The code is updated on the 1st post.