Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
The enabled
property returns or sets whether a menu item, menu, or button is active or inactive (dimmed). Users cannot choose dimmed elements.
If you set the enabled
of a menu to false, all items on the menu become inactive.
The enabled
property won't enable items in HyperCard’s menus unless they're currently available to the user.
For example, the following code won't enable the Button Info command unless a button is selected:
The default state is true
, meaning that the element is enabled.
An expression that evaluates to one of the following:
For example:
An expression that evaluates to one of the following:
For example:
Any expression that evaluates to the HyperTalk and AppleScript constants true
or false
.
For example:
HyperTalk Definition
An expression that identifies a button by name, number, or id, using one of the following forms:
For example:
When used inside a button script: me
When a button receives a message: [the] target
A button can also be referred to as a part when you’re talking about its position among all buttons and fields within the same card or background.
AppleScript Definition
An expression that identifies a button by name, number, or id, using the same forms as HyperTalk except that “background” must be used in place of “bkgnd”.