PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Managing the states via the style
  • Configuring one of the button states
  • 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 in a window
Overview
In WINDEV or WINDEV Mobile applications, buttons can have multiple states. These states are used to manage the different actions performed by the user on the button.
The representation of the button state can be set:
  • by an image.
  • by the style of the button.
The different states are as follows:
StateDescription
NormalThe button is idle.
PressedThe user clicked the button but he has not released the mouse button yet. The button is pressed.
Grayed outThe button is disabled (grayed out) and cannot be selected by the user.
FocusedThe button has focus, it is selected by the user.
HoverThe button is hovered by the mouse cursor.
Managing the states via the style
The "Style" tab is used to easily manage the different states of a button displaying a text. Simply select the desired state and the element to be configured.
The "General" state corresponds to the general style of the button. This general style is applied to all the states of the button ("Normal", "Hover" and "Pressed").

Configuring one of the button states

To configure one of the button states:
  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, frame, etc.).
Remark: In this case, the "Grayed" state corresponds only to the grayed out text.
Managing the states via images
To configure the states of a button used to display images (or whose shape is redefined), the different states must be managed via images.
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
Normal button pressed grayed selected and hovered
WINDEV proposes two types of images for the button controls:
  • the image of the button border: this image is used to define the shape of the button. It can contain up to 5 drawings, corresponding to the different states of the button.
    Android Widget Only the image of button border can be configured.
  • the image associated with the button: this image will be displayed on the button, overlaying the border of the button if it exists. It can contain up to 5 drawings, corresponding to the different states of the button.
    You have the ability to manage separately:
    • the states of the image associated with the button
    • the states of the image for the button border.
      The image associated with the button can be re-used regardless of the button shape.
See Images and buttons for more details.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment