ph_setccobjbcolor PowerHome formula function
Description
Updates the background color for the specified Control Center object
Syntax
ph_setccobjbcolor ( al_color )
ph_setccobjbcolor ( as_tab, as_id, al_color )
Argument |
Description |
as_tab
|
String (Optional). The ID of the Control Center tab containing the object. If this parameter is omitted, the system variable CCTAB will be used
|
as_id
|
String (Optional). The ID of the object on the specified tab. If this parameter is omitted, the system variable CCOBJ will be used
|
al_color
|
Long . The RGB color value you would like to set to the background color for the object
|
Return value
Long. Returns 0
Usage
Use this function to set the
background color for a Control Center object on a CC tab. A typical use of this
function would be to set the current background color of a Control Center object
that was triggered and initiated an action such as a formula or macro. In that
use case scenario, you can call the function without parameters and
the ID's for both the tab and object will be automatically supplied by the system variables. If you wish to set the background color for a CC object other than one that initiated an action, you must specify both the tab and object ID's
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_setccobjbcolor(rgb(255,255,0))
- If called from within
a formula that was triggered by the action of a Control Center object, sets
the background color for that CC object to
yellow
• ph_setccobjbcolor("TV","POWER",rgb(0,255,0))
- Sets the background
color for the POWER object on the TV Control Center tab to
green