Page 1 of 1

How to add controlset to a form programatically

Posted: Tue Oct 09, 2018 11:38 am
by toddkenn@gmail.com
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

Posted: Tue Oct 09, 2018 11:42 am
by jvierra
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.

Re: How to add controlset to a form programatically

Posted: Tue Oct 09, 2018 11:45 am
by jvierra
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.