ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Styles / WINDEV styles
  • Overview
  • How to view the content of a style sheet (.STY file)?
  • How to modify or delete a style in a style sheet (.STY file)?
  • Modifying a style in a style sheet (".STY" file)
  • Deleting a style from a style sheet (".STY" file)
  • How to import a style into a style sheet (".STY" file)?
  • How to define the default style for a type of control?
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
Overview
A style sheet is a ".STY" file. A style sheet groups:
  • the style of window controls (background color, font, border, etc.),
  • information on the appearance of window controls (background image, dimension, etc.).
The custom style sheets can be handled from the interface of window editor. For more details, see Custom style sheet.
Handling the styles via the ".STY" files is an advanced WINDEV option.
From the ".STY" file, you can:
How to view the content of a style sheet (.STY file)?
To view the content of a style sheet, all you have to do is open the corresponding ".STY" file in WINDEV. The styles found in the style sheet are listed one above the other.
Remark: The skin template style sheets are located in the "Personal\Templates\WD\<SkinTemplate>" directory of the WINDEV installation directory.
How to modify or delete a style in a style sheet (.STY file)?

Modifying a style in a style sheet (".STY" file)

To modify a style in a style sheet (".STY" file):
  1. Open the style sheet (".STY" file) containing the style to modify.
  2. Select the style to modify.
  3. Double-click the style (or select "Skin-template description" from the popup menu).
  4. Make the desired changes and apply them.
  5. Save the style sheet ().
Remarks:
  • These modifications will be applied to the controls that use this style when opening the project and/or the windows.
  • If a project was open when the style sheet was modified (".STY" file), go to the "Project" tab, "Project" group, expand "Recompile and synchronize" and select "Refresh style and skin template" to take into account the changes made in the current project.
Caution: When updating WINDEV, the modifications performed on the style sheets of skin templates may be overwritten. If modifications are performed in the style sheets of skin templates, we advise you to make a backup copy of the modified files.

Deleting a style from a style sheet (".STY" file)

To delete a style from a style sheet (".STY" file):
  1. Open the style sheet (".STY" file) containing the style to delete.
  2. Select the style to delete.
  3. Select "Delete" from the popup menu (or press the Del key).
  4. Save the style sheet ().
Remarks:
  • When opening a project and/or a window that uses the deleted style, you can:
    • change nothing. The controls that use the deleted style will not be modified. We advise you to associate these controls with other styles.
      The deleted style can be added to the custom style sheet of the project during the next opening.
    • add the deleted style to the custom style sheet of the project.
  • If a project was opened when a style was deleted from a style sheet:
    • close this project: on the "Home" tab, in the "General" group, expand "Close" and select "Close project".
    • re-open this project to take the deletion of the style into account in the current project: on the "Home" tab, in the "General" group, expand "Open" and select "Open a project".
How to import a style into a style sheet (".STY" file)?
To import a style into a style sheet (".STY" file):
  1. Open the style sheet (".STY" file) containing the style to export.
  2. Select the style to export.
  3. Copy the selected style to the clipboard (Ctrl + C).
  4. Open the style sheet (".STY" file) into which the style will be imported.
  5. Paste the clipboard content (Ctrl + V).
  6. Save the style sheet (".STY" file) into which the style was imported (). The imported style is now available in both style sheets.
    Remark: If the imported style uses specific files (e.g., the image file displayed in the background of the control), these files are copied to the directory of the import style sheet.
Caution: When updating WINDEV, the styles imported into the style sheets of skin templates may be overwritten. If modifications are performed in the style sheets of skin templates, we advise you to make a backup copy of the modified files.
How to define the default style for a type of control?
To define the style used by default for a type of control in the current project:
  1. Open the style sheet (".STY" file) used by the current project.
  2. Select the style to use for a type of control. For example, two styles are available for a "Button" control: "StyleBtnA" and "StyleBtnB". To use the "StyleBtnA" by default, select the "StyleBtnA" style.
  3. Double-click the style (or select "Skin-template description" in the context menu). The style description window appears.
  4. Go to the "Details" tab.
  5. Check "By default" and validate.
  6. Save the style sheet ().
Remark: If your project is associated with several style sheets of skin templates, the style used by default will be selected according to the following order:
  • the style defined by default in the custom style sheet.
  • the style defined by default in the style sheet of the skin template associated with the current window.
  • the style defined by default in the default style sheet of WINDEV.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/12/2023

Send a report | Local help