PC SOFT

WINDEV的在线文档

  • Overview
  • Programming in WLanguage
  • Passing parameters to a control template
  • Example: File picker created via a control template
  • Retrieving the default value of the file picker
  • Transmitting the value entered in the control template
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Handling a Control Template control by programming

Overview
The "Control template" control is used to display an existing control template. Several operations can be performed on the "Control Template" control by programming.

Programming in WLanguage

Passing parameters to a control template

To pass parameters to a control template, we recommend that you:
  1. Create an initialization procedure in the control template.
  2. Call this procedure in the window that contains the "Control Template" control.

Example:

// -- Initialization code of Window1
// TPLC_MyControlTemplate is a control of Window1
// that is linked to a control template
// This control template contains a procedure Init()
TPLC_MyControlTemplate.InitParam1Param2

Example: File picker created via a control template

Retrieving the default value of the file picker

To retrieve in the control template the default value of the file picker:

1. In the initialization code of the host window for example, initialize the value of the control template:

TPLC_ControlTemplate1"C:\temp"

2. In the "Assign the ..值 property" process of the control template, retrieve the value and assign this value to the edit control of the picker:

EDT_DirEdit=我自己..值

Transmitting the value entered in the control template

To transmit the value entered by the user to the host window:

1. In the "Retrieve the ..值 property" process of the control template, enter:

我自己=EDT_DirEdit..值

2. In the host window, retrieve the value of the Control Template control:
信息TPLC_ControlTemplate1..值)