Shiny Language Reference
Language Reference > User Interface
deletecontrol
bool deletecontrol(int ID);
Synonyms:
bool delcontrol(int ID);
Delete a control
The DELETECONTROL statement deletes the control matching the specified control ID from the display panel. The control ID is free to be reused.
Parameters
ID
The ID of the control to delete
Return Value
True if the deletion succeeded (if the control ID was valid), otherwise False.
Example Code
function Init()
{
int ExplorerButtonID = createbutton(1, 10, 10, 50, 20);
sethandler(ExplorerButtonID, "ExplorerButton");
}
function ExplorerButton(int iControlID, dword dwHandle, int iMessage)
{
// When the button is clicked, delete it
if(iMessage == BUTTON_CLICKED)
deletecontrol(iControlID);
}