Page 1 of 1

Create Dynamic Instances of Objects

Posted: Thu Jun 21, 2018 10:33 pm
by d_reibelt
Is this possible to declare new instances and remove instances of objects on a screen on the fly.

eg: On_ScreenOpened, read some tag, draw n# instances at dynamic positions

then animate those instances individually from those positions and toggle visibility at different stages based on arbitrary tag values

// this bit could be done with a reset position and visibility control
finally remove those instances and create a new set of instances.

Re: Create Dynamic Instances of Objects

Posted: Mon Jun 25, 2018 6:44 am
by AMitchneck
d_reibelt,

Technically, this can be done, but I've never tried it before in iX. In C#, to add a control to the screen you would create the object, add it to the form's Controls list, then refresh the form. To remove it, you would remove the object from the controls list, etc. Doing some digging, it seems iX's equivalent to Controls is DrawingPrimitives.

Re: Create Dynamic Instances of Objects

Posted: Tue Jun 26, 2018 3:18 am
by d_reibelt
AMitchneck,

yes thanks, I found a way to do it using standard forms techniques. This key is understanding how iX is doing the same thing.