How to add controlset to a form programatically
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- toddkenn@gmail.com
- Posts: 28
- Last visit: Sun Jan 08, 2023 7:26 am
How to add controlset to a form programatically
Hi - I know this is probably a stupid question, but I can't seem to wrap my head around how I can click a button which will add a specific set of controls. I know you can create controlsets and then add them for reuse but I was looking to kind of leverage that feature and create something dynamic, kind of like an editor where a user can select a button that would add a specific controlset to a form. Any bump in the write direction is appriciated.
Re: How to add controlset to a form programatically
Control sets cannot be dynamically assigned to a form outside of PSS. The closest you can get is to add the components of the control set to form and connect the events as needed.
Just review the generated code to see how a control set gets created and write that into your code.
Just review the generated code to see how a control set gets created and write that into your code.
Re: How to add controlset to a form programatically
You can also just add the start job button and hide it. Now just create a buton wherever you want it and have to call the "Add-JobTracker" Command to you new button. This can be added to as many buttons as you want to create.