PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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.Init(Param1, Param2)
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 ..Value property" process of the control template, retrieve the value and assign this value to the edit control of the picker:
EDT_DirEdit = MySelf..Value

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 ..Value property" process of the control template, enter:
MySelf = EDT_DirEdit..Value
2. In the host window, retrieve the value of the Control Template control:
Info(TPLC_ControlTemplate1..Value)
See also
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment