Shiny Language Reference
Language Reference > User Interface
setcaption
setcaption(int ID, string Caption);
Sets the caption text for a control
The SETCAPTION statement sets the text string used for a control's caption. The caption of a control is the most visible textual aspect that can logically be set to a string, for example the text on a button. This statement is the Shiny equivalent to the Win32API function "SetWindowText".
You may set the caption at any time. If you use a custom draw button, the caption text is stored separately and will not cause a redraw of the button when changed.
Parameters
ID
The ID of the control to set the caption for
Caption
The text string for the new caption
Return Value
None
Example Code
function Init()
{
int ExplorerButtonID = createbutton(1, 10, 10, 50, 20);
setcaption(ExplorerButtonID, "Run Explorer!");
}