PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Not applying the skin template to one of the project windows
  • ".WDY" file
  • Deploying an application
  • Font
  • Style of controls
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
Dynamically changes the skin template:
  • of all windows found in the current application,
  • of the windows found in the WINDEV components used by the application,
  • of a specific window found in the project.
Caution:
  • This function has no effect on the skin templates applied to a report.
  • This function has no effect on the clipped windows. The skin template is not modified.
Example
// Use the "Sea" skin template for all application windows
ChangeSkinTemplate("", "C:\MyApp\Sea.WDY")
// Use the "Emerald" skin template for the current window
ChangeSkinTemplate(MyWindow..Name, "Emerald.WDY")
Syntax
<Result> = ChangeSkinTemplate(<Element to Modify> , <New Skin Template> [, <WLanguage Procedure>])
<Result>: Boolean
  • True if the skin template was modified,
  • False if a problem occurred.
<Element to Modify>: Constant or character string
This parameter can correspond to:
"" (empty string)The new skin template will be applied to all windows found in the current application (including the windows found in the WINDEV components used by the application).
In a .NET assembly generated by WINDEV, the new skin template will be applied to all windows found in the current assembly and to all windows found in the WINDEV .NET assemblies that are loaded in parallel by the application.
AllComponentsThe new skin template will be applied to the windows found in all the WINDEV components used by the application
"<Window Name>"The new skin template will be applied to the specified window
<New Skin Template>: Character string (with quotes)
Name of skin template to apply (name and path of "*.WDY" file if necessary). If this parameter corresponds to an empty string (""):
  • the skin template defined in the window editor will be applied by default. Caution: If a skin template was dynamically applied by ChangeSkinTemplate, this dynamic skin template will be kept.
  • the windows already opened will keep the current skin template.
<WLanguage Procedure>: Optional character string (with quotes)
Versions 22 and later
WLangage procedure ("callback" procedure) called when the skin template is applied to an internal window further to the call to ChangeSourceWindow.
This procedure has the following format:
PROCEDURE <Procedure Name>(<Destination Internal Window>, <Skin Template>)
where:
  • <Destination Internal Window> is a Control variable corresponding to the internal window onto which the skin template is applied.
  • <Skin Template> is a string corresponding to the name of the skin template used.
New in version 22
WLangage procedure ("callback" procedure) called when the skin template is applied to an internal window further to the call to ChangeSourceWindow.
This procedure has the following format:
PROCEDURE <Procedure Name>(<Destination Internal Window>, <Skin Template>)
where:
  • <Destination Internal Window> is a Control variable corresponding to the internal window onto which the skin template is applied.
  • <Skin Template> is a string corresponding to the name of the skin template used.
WLangage procedure ("callback" procedure) called when the skin template is applied to an internal window further to the call to ChangeSourceWindow.
This procedure has the following format:
PROCEDURE <Procedure Name>(<Destination Internal Window>, <Skin Template>)
where:
  • <Destination Internal Window> is a Control variable corresponding to the internal window onto which the skin template is applied.
  • <Skin Template> is a string corresponding to the name of the skin template used.
Remarks
Versions 23 and later

Not applying the skin template to one of the project windows

To avoid applying the skin template to one of the project windows:
  1. Display the description window of relevant window.
  2. In the "Style" tab, check "Always keep the initial style/skin template".
  3. Validate.
New in version 23

Not applying the skin template to one of the project windows

To avoid applying the skin template to one of the project windows:
  1. Display the description window of relevant window.
  2. In the "Style" tab, check "Always keep the initial style/skin template".
  3. Validate.

Not applying the skin template to one of the project windows

To avoid applying the skin template to one of the project windows:
  1. Display the description window of relevant window.
  2. In the "Style" tab, check "Always keep the initial style/skin template".
  3. Validate.

".WDY" file

The description of a skin template is stored in a ".WDY" file.
The ".WDY" files corresponding to the skin templates proposed by WINDEV are supplied with WINDEV.
Notes:
  • When creating a skin template, the ".WDY" file is automatically created.
  • To generate the ".WDY" file of an existing skin template, open the "<NameOfSkinTemplate>.STY" file in WINDEV and save this file ( Backup icon ).

Deploying an application

When creating the setup program of your application, the following elements must be added into the list of elements to install:
  • the ".WDY" file corresponding to the new skin template applied by ChangeSkinTemplate.
  • the image files used by the new skin template applied by ChangeSkinTemplate.
Caution: The images must have different names in the different skin templates used otherwise these images will not be modified. For the buttons, the image of the button is not affected by the change, only the image of the border is replaced by the image of the skin template.
Note: To add one or more elements to the list of project elements:
  1. Select "Project .. List of project elements".On the "Project" pane, in the "Project" group, expand "List of elements" and select "List of project elements".
  2. Click the "Add" button.
  3. Select the files to add and validate.

Font

Dynamically loading skin templates has no effect on the font of the static controls. Indeed, systematically changing the font could trigger unexpected display effects (truncated or overlapping text) because the size of the static controls changes with the font.
If a change of font must be done when a new skin template is applied by programming, use ..Font in addition to ChangeSkinTemplate.

Style of controls

ChangeSkinTemplate dynamically changes the skin template of ALL the controls (controls linked to a project style or dissociated controls). To apply the style of a skin template to some controls only, apply ChangeStyle to the relevant controls.
Versions 20 and later
Note: You also have the ability to copy the style of a control to another one via ..Style.
New in version 20
Note: You also have the ability to copy the style of a control to another one via ..Style.
Note: You also have the ability to copy the style of a control to another one via ..Style.
Related Examples:
WD Changing Skin Templates Training (WINDEV): WD Changing Skin Templates
[ + ] The “WD Changing Skin Templates” example presents a solution allowing the users to dynamically change skin templates.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment