ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Button control
  • Overview
  • Button and tab
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The different types of buttons in a window
Overview
WINDEV and WINDEV Mobile include 5 types of buttons. Each one performs a specific action.
TypeDescription
NormalStandard 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.
Universal Windows 10 AppAndroidAndroid Widget This type of button is not available.
InterruptButton 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.
Universal Windows 10 AppAndroid Widget This type of button is not available.
CancelThe 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.
Universal Windows 10 AppAndroid Widget This type of button is not available.
HelpThe 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.
Universal Windows 10 AppAndroidAndroid Widget This type of button is not available.
Summary table:
If your window contains no edit control
Type of button to be usedNormal 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.
Button and tab
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.
Universal Windows 10 App The management via Tab key is not available.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/07/2022

Send a report | Local help