Shiny Language Reference

Language Reference > User Interface


getcontrolheight

int getcontrolheight(int ID);

 

 

Returns the height of a control

The GETCONTROLHEIGHT statement returns the height of a control in pixels. This statement applies to the most logical form of a control. For example, when applied to a button it simply returns the height, however when applied to a combobox it returns the height of the non-dropdown state.

 

Parameters

ID

The ID of the control to resize

 

Return Value

The height in pixels, or -1 if an invalid control ID was provided

 

Example Code

function Init()
{
    // Create a 50*20 button
    int ExplorerButtonID = createbutton(1, 10, 10, 50, 20);
    
    // Height will be set to 20
    int Height = getcontrolheight(ExplorerButtonID);
}