PC SOFT

WINDEV的在线文档

  • Overview
  • How to create a Container column?
  • The different steps
  • Main control of a Container column
  • Limitations
  • Using a Container column
  • Browsing table or table on source
  • Memory table
  • Handling the controls found in the Container column
  • Limit: Unavailable control types
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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
A table cell can contain a set of controls. Several types of controls can be include in a Container column:
  • Static control,
  • edit control,
  • Image control,
  • Button control,
  • 16版本和更高版本
    WinDev Chart control,
    16新版本
    WinDev Chart control,
    WinDev Chart control,
  • 16版本和更高版本
    WinDev Table control,
    16新版本
    WinDev Table control,
    WinDev Table control,
  • 16版本和更高版本
    WinDev Internal Window control,
    16新版本
    WinDev Internal Window control,
    WinDev Internal Window control,
  • ...
A main control can be defined for the cell. This control will be the one used:
  • for the additions performed by programming,
  • for the sorts,
  • for the link with the data (link with an item or with a variable), ...
16版本和更高版本
WinDev Via the internal windows, all the controls of the container column can have a different content for each row of the Table control.
16新版本
WinDev Via the internal windows, all the controls of the container column can have a different content for each row of the Table control.
WinDev Via the internal windows, all the controls of the container column can have a different content for each row of the Table control.

15版本和更高版本
WinDev The Container columns are available in Java.
15新版本
WinDev The Container columns are available in Java.
WinDev The Container columns are available in Java.
17版本和更高版本
WinDev The Container columns are available for the TreeView Table controls.
17新版本
WinDev The Container columns are available for the TreeView Table controls.
WinDev The Container columns are available for the TreeView Table controls.
WinDev The Container columns are available for the TreeView Table controls.

How to create a Container column?

The different steps

To create a Container column:
  1. Create a table if necessary (browsing table, memory table or table on source).
  2. Create a Container column (via the popup menu of the Table control or from the description window of the Table control).
  3. Increase (if necessary) the height of the rows found in the Table control with the mouse.
  4. Position the requested controls in the Container cell of the first row found in the Table control. You can:
    • move the existing controls found in the window to the Container column.
    • drag/drop the items of the analysis displayed in the project explorer.
  5. In the description of the Container column, specify (if necessary) the main control of the column ("General" tab) and validate.

Main control of a Container column

The main control of the Container column corresponds to the control handled by default in the column. For example:
  • The sort of the Container column will be performed on the main control.
  • The searches performed in a Container column will be performed on the main control.
  • The additions, the modifications, ... performed by programming: the value of the column specified in 表格添加行 for example will be assigned to the main control.
  • The exports performed from the Table control (exports to Excel, Open Office, Word, ...) will take into account the value of the main control of the column.
  • If the Container column is linked to a data file or to a variable, the control actually linked will be the main control.
The definition of a main control in a Container column is optional.

Limitations

  • WinDev In the Container columns, the Check Box controls must be assigned with a string in the following format: "<True/False>;<True/False>;<True/False>...".
    Similarly, the value returned by these Check Box controls is a string in the following format: "<True/False>;<True/False>;<True/False>...".
  • The captions of the options found in the Radio Button and Check Box controls cannot be customized for each row in a Container column.
  • 16版本和更高版本
    WinDev To use a control with a different value for each row found in a Container column, all you have to do is include this control in an internal window and insert an Internal Window control into the column. This tip can be used for the Radio Button and Check Box controls for example, ...
    16新版本
    WinDev To use a control with a different value for each row found in a Container column, all you have to do is include this control in an internal window and insert an Internal Window control into the column. This tip can be used for the Radio Button and Check Box controls for example, ...
    WinDev To use a control with a different value for each row found in a Container column, all you have to do is include this control in an internal window and insert an Internal Window control into the column. This tip can be used for the Radio Button and Check Box controls for example, ...

WinDev Notes: Internal window, Chart control and Table control in a Container column:
  • Uncheck "Identical content for all the rows" ("GUI" tab of the control description) in order to get a different display on each row.
  • The controls of the internal window, the Chart controls and the Table controls must be filled by programming.

Using a Container column

Browsing table or table on source

A browsing Table control can contain one or more Container columns. The controls found in this Container column can display the records of the data file for example.

In this case, the Table control is linked to the data file.

Each control found in the Container column is linked to the corresponding item.

If a main control is defined on the Table control, we advise you to:

  • solution 1: keep the link between the main control and the item found in the data file. The Container column is linked to no item.
  • solution 2: link the Container column to the item associated with the main control and delete the link at control level.

Memory table

A memory Table control can contain one or more Container columns. The main control of the Container column will be handled by the programming functions of the memory Table control.

For example, when a row is added by 表格添加行, only the main control of the column will be assigned with the value defined by the column. If several controls must be initialized in the column, you must use the syntax described in the next paragraph. For example:

RowNum整数型
RowNum表格添加行TABLE_Table2"Moore"
COL_Column1RowNum】.EDT_FirstName"Flora"

Handling the controls found in the Container column

The controls found in a Container column can be handled via the following syntax:

<Column Name>[<Row Number>].<Control Name>

Some examples:

  • Assigning a value to a control:
    COL_Column1RowNum】.EDT_FirstName"Flora"
  • Assigning elements to combo box of a container:
    COL_Column1RowNum】.COMBO_Combo1..内容="Element 1"+回车+"Element 2"
  • Modifying a control property:
    COL_Column1RowNum】.PriceBT..颜色=浅红色

  • Indirection on a control found in a Container column:
    sControlNameInContainerColumn字符串型
    sControlNameInContainerColumn"TABLE_WithContainerCol.COL_Container["+...
    nRowSubscript+"].EDT_InContainerCol"
    //or
    //sControlNameInContainerColumn = "TABLE_WithContainerCol[" + ...
    // nRowSubscript + "].COL_Container.EDT_InContainerCol"

    信息({sControlNameInContainerColumn})
  • WinDev Adding a row into a Table control found in a Container column:
    // Cf. training example WD Tables and Combos
    表格添加行TABLE_WITH_INTEGRATED_TABLERowNum】.TABLE_In_Container,...
    "Content_Col1""Content_Col2"
  • WinDev Handling a Check Box control inserted into an internal window:
    TABLE_NoName1RowNum】.IW_NoName1.CBOX_CheckBoxSubscript】=

Note: For a browsing Table control, the controls found in a Container column should be handled in the "Row display" process.

Limit: Unavailable control types
WinDev In a Container column, all the controls can be used, either directly, or via an internal window.