|
|
|
|
|
The different types of buttons in a window
WINDEV and WINDEV Mobile include 5 types of buttons. Each one performs a specific action. | | Type | Description |
---|
Normal | Standard button. Sequence of WLanguage events: When a "Normal" button is clicked (or the associated keyboard shortcut is used): - the exit code of the current control is executed.
- the click code of the Button control is executed.
Use mode: "Normal" Button controls should not be used in windows containing controls. This type of button can be used in toolbars, icon bars or windows without edit controls. | Validate | "Default" button of window. Sequence of WLanguage events: During a mouse click on a "Validation" button (or when using the associated shortcut): - the exit code of the current control is executed.
- the click code of the Button control is executed.
The click code of this button is executed when the Enter key is pressed, if:- no other window control intercepts the Enter key.
- no other window control has focus.
If two validation buttons are found in the same window, the code run is the code of first "validation" button found according to the tab order of window.Use mode: A VALIDATION button must be used to validate the input in a window. A VALIDATION button must be found in the window as soon as an input can be performed in an edit control. This is the type used for the "OK" buttons. | Interrupt | Button used to interrupt the current process. Sequence of WLanguage events: During a mouse click on an "Interruption" button (or when using the associated shortcut): - the click code of the Button control is executed.
- the button does not keep focus. The focus is given back to the control that was used beforehand.
Remark: The exit code of current control is not run during the click on the button.Use mode: An "Interruption" button will be used to call a window (to interrupt the current input without validating) and to resume the input. This is the type used for the "Help" buttons. | Cancel | The button and the Esc key have the same action. Sequence of WLanguage events: The exit code of current control is not run during the click on the button. The code of this button is run: - when pressing the Esc key providing that no other window control intercepts the Esc key.
- when pressing Alt + F4.
- when closing the window via the cross.
If two cancellation buttons are found in the same window, the code run is the code of first cancellation button found according to the tab order of window.Use mode: A "Cancel" Button control will be used to "exit" the current window without validating. In a window with input fields, a "Cancel" Button control is required to cancel the current input without validating. This is the type used for the "Cancel" buttons. | Help | The Button control has the same action as the F1 key.. The "Click" event of the control is executed (as opposed to WINDEV 5.5).. This type of Button control opens the help window associated with the current control. A Help Button control loses focus. The focus is given back to the control used previously. Neither the "Leave" nor the "Enter" event of the control is executed when the Help Button control is clicked. | Summary table: | | If your window contains no edit control | Type of button to be used | Normal buttons. | If your window contains at least one edit control | Type of button to be used | - A Validate button.
- A Cancel button.
- A Help button (if the controls have associated help windows).
- All the other buttons are Interruption buttons.
|
According to the Windows standards, the tabulation key (Tab key) is used to move from a control to another one (in edit mode). You also have the ability to move from a control (in edit) to another one with the Enter key: to do so, no active button found in the window must be a Validation button and no control must be associated with the Enter key.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|