removeShape()

The function removes a shape from the panel.

Synopsis

int removeShape(shape shapePointer);

int removeShape(string moduleName, string panelName, string shapeName);

int removeShape(shape panel, string shapeName);

Parameter

Parameter Description
shapePointer Pointer to the shape that should be removed.
moduleName Name of the module.
panelName Name of the panel.
shapeName Name of the shape that should be removed.
panel Pointer to the panel.

Return value

In case of an error -1 is returned or 0 in case of a success.

Error

In case a shape is tried to be removed from a panel reference inside of the panel the function throws an error and returns the error code -1.

Description

The function allows to remove a shape from a panel.

Example

Following example code removes the rectangle "myRectangle" from the current panel.

main(mapping event)
{
  removeShape(self, "myRectangle");
}

Assignment

Graphics

Availability

UI