Shiny Language Reference

Language Reference > User Interface


setcontrolpos

setcontrolpos(int ID, int X, int Y);

 

 

Sets the position of a control

The SETCONTROLPOS statement moves a control to the specified X, Y coordinates within the display panel.

 

Parameters

ID

The ID of the control to move

X

The X position to move the top left corner of the control to. (0, 0) is the top left corner of the display panel.

Y

The Y position to move the top left corner of the control to. (0, 0) is the top left corner of the display panel.

 

Return Value

None

 

Example Code

function Init()
{
    // Create a button at 10, 10
    int ExplorerButtonID = createbutton(1, 10, 10, 50, 20);
    
    // Move it to 20, 20
    setcontrolpos(ExplorerButtonID, 20, 20);
}