Error getting tags :
error 404Error getting tags :
error 404 defaultButton | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
defaultButton
Basics
Expander triangle
Type
Property
Syntax
get the defaultButton of card
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Reports the long ID of the current card's default button.
Examples

send mouseUp to the defaultButton of this card

Additional Comments
Expander triangle

Use the defaultButton property to find out which button on a card is designated as the button to be clicked when the user presses the Return or Enter key.

Value:

The defaultButton of a card is the long ID property of a button.

This property is read-only and cannot be set.

Comments:

The defaultButton property returns the long ID of the button whose default property is set to true.

When the user presses Enter or Return and there is no active control, Revolution sends a mouseUp message to the defaultButton. (If the card contains an editable field, handle the returnInField and enterInField messages to ensure that the default button is activated.)

If more than one button's default is true, the defaultButton property reports the ID of the button whose default property was set to true most recently. This property reports empty if there is no default button.

User Comments
Expander triangle
User thumbnail
rodney@oceanbrowser.com
StarStarStarStarStar
Jun 5, 2010
On MacOSX setting a button to be the defaultButton can cause Revolution & standalone applications to greatly increase CPU usage. In Rev IDE I typically see a change between 8% (idle) to 25-30% (with a defaultbutton present). To prevent this from occurring there is a siimple trick, add a graphic style to the button: create a default button and set the outerGlow["opacity"] of it to 0 However this will stop the "throbbing effect". (Credit to Phil Davis for this tip).