advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Default Property Details
  ◄Summary►  ◄Details►  ◄Example►                ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
 [form.]commandbutton.Default[ = boolean%]
 
 Usage Notes
   ■ A command button with its Default property set to True (-1) is referred
     to as the form's default button.
 
   ■ Only one button on a form can be the default button.
 
   ■ When Default is set to True (-1) for one button, it is automatically
     set to False (0) for all other buttons.
 
   ■ When a command button's Default property is set to True (-1), pressing
     the Enter key simulates selection of the default button and invokes the
     Click event if:
     • The button's container form is active
     • Another command button does not have the focus
 
   ■ If another command button on the same form has the focus, pressing Enter
     invokes the Click event for that button rather than the Default button.
 
   ■ When a control other than a command button has the focus, pressing Enter
     causes a Click event for the default button.
     See: ◄Click Event►  ◄Focus Definition►
 
   ■ For a form that supports an irreversible action such as a delete
     operation, make the Cancel button the default button.
     See: ◄Cancel Property►