PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Changestyle function... there is no ".WDY" file anywere in the project.
Changestyle function... there is no ".WDY" file anywere in the project.
Débuté par KOZETA, 20 jan. 2015 16:14 - 4 réponses
Posté le 20 janvier 2015 - 16:14
Hello,
I want to use changestyle function in windev 20 for controls I create dinamically (with controlcreate()). In the online help it says that the skin template should be the relative/full path of a file that ends in .WDY. However there is no .WDY file inside my project and it throws errors.
Can someone help me?
Best regards,
Kozeta Leka
Posté le 20 janvier 2015 - 16:31
Kozeta
Just had a quick look and all my projects have a WDY file as .
I can only go as far as v19 though.

Have you applied a style to your project ? - this should automatically create the file.

Another option is to pent the control you need to change from the window editor, make the changes you require and in the right hand section of the description window select 'Add to Project'.
This will place the modified control in an .STY file.
The modified control will be part of the project and it will also be available from the 'select style' option when right clicking on the type of control.

If the control is in the project style (.sty) file the ChangeStyle() does not need the 'Skin Template' option
Posté le 20 janvier 2015 - 17:23
Hi Kozeta,

Yeah, it's not obvious at first. To create the WDY file this is very simple. Open a new WinDev IDE with no project. Then simply open (CTRL+O) the .STY of your project. Then Save As (CTRL+SHIFT+S) and type the change the extension to WDY. The IDE will ask you about creating a new template by copy. Answer Yes.

Then you can use this new WDY file (add it to your project too, important). You will have to sync it manually in some case, but at least you will be able to set the style of your field from your project style. (You can make a suggestion to PCSoft to avoid the use of a WDY file when this is only to apply a style which is already in the project styles.)

Also, in WinDev 20, it is possible to very simply copy the style from one field to another using the new ..Style property. So a simple option is also to have an invisible control with the desired style and apply it on demand to the required field.

Best regards,
Alexandre Leclerc
Posté le 21 janvier 2015 - 08:28
Thank you very much! The ..style property works really well!
Best Regards,
Kozeta Leka
Membre enregistré
25 messages
Popularité : +3 (3 votes)
Posté le 24 octobre 2021 - 00:25
Oh man, you are the one!!!!

Thanks Genius!!!