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

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.


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

This property is read-only and cannot be set.


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
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).