Shiny Language Reference

Language Reference > User Interface


getcontrolblendconst

int getcontrolblendconst(int ID);

 

Synonyms:

int getcontrolblendconstant(int ID);

int getcontrolbc(int ID);

 

 

Returns the constant blending factor used for a control

The GETCONTROLBLENDCONST statement returns the current blending factor used for a control as set by setcontrolblendconst.

 

Parameters

ID

The ID of the control to return the blending factor of.

 

Return Value

Blending factor used for the control on a scale of 0 to 255.

 

Example Code

function Init()
{
    // Create a button
    int ExplorerButtonID = createbutton(1, 10, 10, 50, 20);
    
    // Make the button 50% transparent
    setcontrolblendconst(ExplorerButtonID, 128);

    // Retrieve the blending for the button (returns 128 as set)
    int iFactor = getcontrolblendconst(ExplorerButtonID);
}