How do I programmatically set default values like font size and opacity for example for a typewriter (or alternatively all text elements). I know how to do it manually but just couldn't find any code samples to do it programmatically.
When out application is in a special mode we'd like to change these settings to a certain value (e.g. font size 8 and opacity 40 %) and when the special mode is exited we'd like to change the settings back to the previous default values (like font size 12 and opacity 100 %).
How do I programmatically set default values like font size or opacity
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: How do I programmatically set default values like font size or opacity
You need to use:
style = Inst.Settings["Tools.Typewriter.Style"];
style["A"].v = 0.4; // 40% opacity
style["TS.Font.Size"].v = 8; // Font Size is 8pt
...
===
HTH
style = Inst.Settings["Tools.Typewriter.Style"];
style["A"].v = 0.4; // 40% opacity
style["TS.Font.Size"].v = 8; // Font Size is 8pt
...
===
HTH
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.