#
CwGetFirstPropertyValue

### Syntax:

    vPropVal = CwGetFirstPropertyValue(hObject, sPropName)

            vPropVal        (variant) The first possible value of the property.

            hObject         (handle) The object being examined.

            sPropName       (string) The name of the property being examined.

### Description:

Some properties may only have a relatively small range of values which sometimes may vary across versions or even installations. An example of such a property is the "Font" property of text objects. This function is used to list all possible values of such properties. A complete list of property values can be obtained by calling CwGetFirstPropertyValue with the object handle and property name as arguments. The return value is the first property value.

Subsequent property values can be obtained by CwGetNextPropertyValue. Once the last property value has been returned, CwGetNextPropertyValue returns an empty string.

If a property does not have a small set of values (e.g. a property expecting arbitrary numeric arguments), CwGetFirstPropertyValue will return an empty string.

### Example:

    /* This function takes an object and a property name and returns a
       string containg them all in a comma-separated list. */

    allprops: procedure
    parse arg obj, prop

    v = CwGetFirstPropertyValue(obj, prop)
    if v = '' then
            r = 'Any'
    else
            do while v \= ''
                    r = r||"," v
                    v = CwGetNextPropertyValue()
                    end
    return r

Functions by NAME | Index | Functions by PURPOSE