PC SOFT

WINDEV的在线文档

  • Overview
  • Managing the states via the style
  • Configuring one of the button states
  • Managing the states via the images
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

The different states of a button in a window

Overview
In a WinDev or WinDev Mobile application, the buttons can have several states. These states are used to manage the different actions performed by the user on the button.

The representation of the button status can be managed:
  • by an image
  • by the style of the button
The different states are as follows:

ReportDescription
NormalThe button is idle.
PushedThe user has clicked the button but he has not released the mouse button yet. The button is pressed.
GrayedThe button is disabled (grayed) and it cannot be selected by the user.
In progressThe button has focus, it is selected by the user.
RolloverThe 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. All you have to do is select the requested status and the element to configure.

The "General" status corresponds to the general style of the button. This general style is applied to all the states of the button ("Normal", "Pressed" and "Rollover").

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 state you want.
  3. Select the element to configure based on the state
  4. Configure the characteristics of the element for the selected state (background color, frame, ...).
Note: In this case, the "Grayed" status corresponds to the grayed caption.

Managing the states via the 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 status 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.
  • 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.