- Not applying the skin template to one of the project windows
- ".WDY" file
- Deploying an application
- Style of controls
In french: ChangeGabarit
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.
- 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.
// Use the "Sea" skin template for all application windows
// Use the "Emerald" skin template for the current window
<Result> = ChangeSkinTemplate(<Element to modify> , <New skin template> [, <WLanguage procedure>])
- 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.
|AllComponents||The 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
Name of the skin template to be applied (name and path of the "*.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 has been dynamically set with ChangeSkinTemplate, it will take precedence.
- the windows already opened will keep the current skin template.
<WLanguage procedure>: Optional procedure name
WLanguage 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>)
- <Destination internal window> is a Control variable corresponding to the internal window to which the skin template is applied.
- <Skin template> is a string corresponding to the name of the skin template used.
Not applying the skin template to one of the project windows
To avoid applying the skin template to one of the project windows:
- Open the description of the corresponding window.
- In the "Style" tab, check "Always keep the initial style/skin template".
The description of a skin template is stored in a ".WDY" file.
The ".WDY" files corresponding to the skin templates proposed by WINDEV are provided with WINDEV.
- 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 ().
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 of the new skin template set with 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.
Remark: To add one or more elements to the list of project elements:
- On the "Project" tab, in the "Project" group, expand "List of elements" and select "List of project elements".
- Click the "Add" button.
- Select the files to add and validate.
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 through programming, use Font
in addition to ChangeSkinTemplate
Style of controls
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.
Remark: You also have the ability to copy the style of a control to another one via Style.
Training (WINDEV): WD Changing Skin Templates
This page is also available for…