ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Button control
  • Overview
  • Managing the states via the style
  • Configuring one of the states of the Button control
  • Managing the states via images
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 states of a Button control in a window
Overview
In WINDEV or WINDEV Mobile applications, Button controls can have multiple states. These states allow you to manage the different actions performed by the user on the Button control.
The state of the Button control state can be set:
  • by an image.
  • by the style of the control.
The different states are as follows:
StateDescription
NormalThe Button control is idle.
PressedThe user has clicked the Button control, but has not yet released the mouse button. The Button control is pressed.
Grayed outThe Button control is disabled (grayed out) and cannot be selected by the user.
FocusedThe Button control has focus, it is selected by the user.
HoverThe Button control is hovered over by the mouse cursor.
Managing the states via the style
The "Style" tab allows you to easily manage the different states of a Button control that displays text. Simply select the desired state and the element to be configured.
The "General" state corresponds to the general style of the Button Control. This general style is applied to all the states of the control ("Normal", "Hover" and "Pressed").

Configuring one of the states of the Button control

To configure one of the states of the Button control:
  1. Display the "Style" tab of the control description.
  2. Select the desired state.
  3. Select the element to be defined according to the state
  4. Define the characteristics of the element for the selected state (background color, borders, etc.).
Remark: In this case, the "Grayed" state corresponds only to the grayed out text.
Managing the states via images
Use images to handle the different states of a Button control that displays images or that has a redefined shape.
Each state corresponds to a specific drawing. All the drawings are saved in a single image. This image is associated with the Button control: all you have to do is specify the number of states (or drawings) found in the image file.
Example: BlueButton.gif image file
Button control: idle, pressed, grayed out, selected, hovered
WINDEV includes two types of images for Button controls:
  • image of the control border: this image is used to define the shape of the Button control. It can contain up to 5 drawings, corresponding to the different states of the control.
    Android Widget Only the image of the Button control border can be configured.
  • image associated with the control: this image will be displayed on the Button control, overlaying the border (if any) of the control. It can contain up to 5 drawings, corresponding to the different states of the control.
    You have the ability to manage separately:
    • the states of the image associated with the Button control
    • the states of the image of the Button control border.
      The image associated with the Button control can then be reused regardless of the shape of the control.
For more details on how to handle images with Button controls, see Images and buttons.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/02/2022

Send a report | Local help