CwHasProperty

Syntax:

bFlag = CwHasProperty(hObject, sProperty)

        bFlag           (boolean) True (1) if the specified object has the
                        requested property, false (0) otherwise.

        hObject         (handle) Handle to an object.

        sProperty       (string) The name of a property.

Description:

This function determines whether the specified object (hObject) has the specified property (sProperty). If it does, the function returns 1. If not, it returns 0. The property name is of the form "Property:Element" if the property has elements.

Case is not significant in a property name.

Example:

/* Turn the first object blue if possible. */
object = CwFindNextObject(0)

tool = CwGetTool(object)
if CwHasProperty(tool, "Color") then do
        call CwSetProperty tool, "Color", "Blue"
        end
else if CwHasProperty(tool, "Top-left:HSV Color") then do
        call CwSetProperty tool, "Top-Left:HSV Color", "Blue"
        call CwSetProperty tool, "Top-Right:HSV Color", "Blue"
        call CwSetProperty tool, "Bottom-Left:HSV Color", "Blue"
        call CwSetProperty tool, "Bottom-Right:HSV Color", "Blue"
        end


Functions by NAME

Index

Functions by PURPOSE