ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • ".WDY" file
  • Deploying an application
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Modifies the style of a control dynamically.
Example
// Modify the style of EDT_Edit1 control
ChangeStyle(EDT_Edit1, "Edit_No_caption__Display")
Syntax
<Result> = ChangeStyle(<Control used> , <Style to apply> [, <Skin template to apply>])
<Result>: Boolean
  • True if the style was changed,
  • False if an error occurred.
<Control used>: Control name
Name of control whose style must be modified.
<Style to apply>: Character string
Name of style defined in edit. This style must be applicable to the specified type of control.
<Skin template to apply>: Optional character string
Name of the skin template to be applied (name and path of the "*.WDY" file, if necessary). The extension must not be specified.
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.
If this parameter is not specified, the skin template file (*.WDY) associated with the current project will be used.
Remarks

".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 provided with WINDEV.
To apply a custom style or a project style, the following syntax must be used:
ChangeStyle(<Control>, <CustomStyle>, <ProjectName.wdy>)
Except if it was renamed, the .WDY containing the project styles is named like the project itself.
Remarks:
  • 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: on the "Home" tab, in the "General" group, click "Open".
    • Save this file: on the "Home" tab, in the "General" group, click "Save".

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 project.
  • the ".WDY" file corresponding to the new skin template applied by ChangeStyle.
  • the image files used by the new skin template applied by ChangeStyle. Caution: the images used by the different skin templates must have different names otherwise these images will not be modified.
Remark: To add one or more elements to the list of project elements:
  1. On the "Project" tab, in the "Project" group, expand "List of elements".
  2. Select "List of project elements".
  3. Click the "Add" button.
  4. Select the files to add and validate.

Miscellaneous

  • You also have the ability to copy the style of a control to another one via Style.
  • When changing style, the positioning of captions is not modified. Indeed, changing the positioning of captions could trigger modifications regarding the size of the control. The control could come into conflict with other controls.
  • Button controls:
    • If the style includes an image, this image overwrites the initial image of the button.
    • If the style includes no image, the initial image of the button is kept.
Component: wd290obj.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help