PC SOFT

WINDEV的在线文档

  • Overview
  • Background image of a window
  • Image control
  • Button control
  • Configuring the 9-image mode
  • Optimizing the 9-image mode
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Overview
The 9-image mode allows you to resize the images harmoniously. The 9-image mode can be used on the images found in an Image control or on the background image of a window.

The principle of the 9-image mode is straightforward: the image is divided into 9 sections. Then, you have the ability to define how each section will behave when the image control or the window is resized.

Background image of a window
To define the 9-image mode for the background image of a window:
  1. Display the description window of the window.
  2. In the "Image" tab, select "Use the 9-image mode" and configure this mode with.
  3. The following screen is displayed:
  4. Configure the 9-image mode according to your requirements. The "Preview" button is used to see how the image will be displayed at run time.
Note: Some tips for optimizing the display speed of the windows that use the 9-image mode:
  • do not use a "Transparent GIF" image with the 9-image mode
  • use a plain background for the image and for the background color of the window.
  • try to define margins that are multiple of 4.

Image control
To define the 9-image mode of an Image control:
  1. Display the description window of the control.
  2. In the "General" tab, select "Use the 9-image mode" and configure this mode with.
Note: no "Transparent GIF" image should be used with the 9-image mode otherwise the display may be slowed down.

Button control
16版本和更高版本
To define the 9-image mode of a Button control:
  1. Display the description window of the control.
  2. In the "General" tab, select "Stretch: Custom 9-image mode" and configure this mode with the button.
Note: no "Transparent GIF" image should be used with the 9-image mode otherwise the display may be slowed down.
16新版本
To define the 9-image mode of a Button control:
  1. Display the description window of the control.
  2. In the "General" tab, select "Stretch: Custom 9-image mode" and configure this mode with the button.
Note: no "Transparent GIF" image should be used with the 9-image mode otherwise the display may be slowed down.
To define the 9-image mode of a Button control:
  1. Display the description window of the control.
  2. In the "General" tab, select "Stretch: Custom 9-image mode" and configure this mode with the button.
Note: no "Transparent GIF" image should be used with the 9-image mode otherwise the display may be slowed down.

Configuring the 9-image mode
The 9-image mode consists in dividing the background image into 9 areas.

For each area, you can define whether the section of the image corresponding to the area must be displayed or not: all you have to do is click the area to make it visible or invisible. If the image section is not displayed, it will be replaced by the background color of the window or control.

The margins are used to define the size of each area. You have the ability to enter the values of the different areas or to move the line corresponding to the margin.

When resizing the window, only the areas 2, 4, 6, 8 and 5 are resized to occupy the entire space:

The 9-image mode is used to manage the operating mode of each area when the window is resized. For each area, the image will be enlarged:

  • By repeating the image that constitutes the area
  • By stretching the image that constitutes the area
In the window for configuring the 9-image mode:
  • The "Width mode" option is used to manage the resize operation for the areas 2 and 8 (Top area and Bottom area)
  • The "Height mode" option is used to manage the resize operation for the areas 4 and 6 (Left area and Right area)
  • The "Center mode" option is used to manage the resize operation for the area 5 (Center area)

Optimizing the 9-image mode
Some tips for optimizing the 9-image mode:
  • Use multiples of 8 for the margins in width.
  • The width of the middle area must be at least equal to 32 pixels.