effective

Typekeyword
DictionaryLCS
LibraryLiveCode Script
Syntax
effective
Summary

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

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
put the effective textColor of me into myColor
RelatedKeyword: card, rectangle, button
Property: borderPattern, foregroundColor, threeDHilite, bottomPattern, focusColor, properties, focusPattern, filename, label, backgroundColor, owner, layerMode, topColor
Object: button
Glossary: object, property, keyword, substack, font, inheritance
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's backgroundColor. You use the effective keyword to get the color that is actually used. If the button's 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.

Tagsfile system