effective

Used with inheritance properties to specify the object own setting or the setting inheritance from the object owner, whichever is actually displayed.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

effective

# Examples

put the effective textColor of me into myColor

# Description

Use the effective keyword to get the displayed color or font of an object, regardless of whether the object itself has that property set. The effective keyword can also be used to get the filename of a substack or the current rectangle of an object.

If one of an object's text, color, or pattern properties is set to empty, the owner's setting is used instead. (If the owner's setting is empty, the setting of that object's owner is used.)

For example, if a card button's backgroundColor property is empty, the backgroundColor of the card is used as the button backgroundColor. You use the effective keyword to get the color that is actually used. If the button backgroundColor is not set to empty, the effective keyword gets the setting for the button, since that setting is what the button displays as its background color.

The effective keyword can be used with the following inherited properties :

* backgroundColor property * backgroundPattern property * backgroundPixel property * bottomColor property * bottomPattern property * bottomPixel property * focusColor property * focusPattern property * focusPixel property * foregroundColor property * foregroundPattern property * foregroundPixel property * hiliteColor property * hilitePattern property * hilitePixel property * topColor property * topPattern property * topPixel property * shadowColor property * shadowPattern property * shadowPixel property

* textFont property * textHeight property * textSize property * textStyle property

* filename of stack property * rectangle property

* layerMode property

>*Note:* The effective keyword is implemented internally as a property > and appears in the propertyNames. However, it cannot be used as a prop > in an expression, nor with the set com.

# Tags

# See