PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • ".WDY" file
  • Deploying an application
  • Various
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
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 Name> , <Style Name> [, <Name of Skin Template>])
<Result>: Boolean
  • True if the style was changed,
  • False if an error occurred.
<Control Name>: Character string (with or without quotes)
Name of control whose style must be modified.
<Style Name>: Character string (with quotes)
Name of style defined in edit. This style must be applicable to the specified type of control.
<Name of Skin Template>: Optional character string (with quotes)
Name of skin template to apply (name and path of "*.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 was dynamically applied by ChangeSkinTemplate, this dynamic skin template will be stored.
  • 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 supplied with WINDEV.
To apply a custom style or a project style, the following syntax must be used:
ChangeStyle(<ControlName>, <MyCustomStyle>, <ProjectName.wdy>)
Except if it was renamed, the .WDY containing the project styles is named like the project itself.
Notes:
  • When creating a skin template, the ".WDY" file is automatically created.
  • The skin templates edited with a version 11 (or earlier) must be re-saved with a version 12 (or later): to do so, open the WDY file in the editor and save it.
    To generate the ".WDY" file of an existing skin template, open the "<NameOfSkinTemplate>.STY" file in WINDEV ("File .. Open") and save this file ("File .. Save").To generate the ".WDY" file of an existing skin template:
    • Open the "<NameOfSkinTemplate>.STY" file in WINDEV: on the "Home" pane, in the "General" group, click "Open".
    • Save this file: on the "Home" pane, 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.
Note: To add one or more elements to the list of project elements:
  1. Select "Project .. List of project elements".
  2. Click the "Add" button.
  3. Select the files to add and validate.
Note: To add one or more elements to the list of project elements:
  1. On the "Project" pane, 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.

Various

  • Versions 20 and later
    You also have the ability to copy the style of a control to another one via ..Style.
    New in version 20
    You also have the ability to copy the style of a control to another one via ..Style.
    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.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment