J
jquerijero
Guest
Controls:Clone will create a shallow copy of the Controls array, meaning you will get a new array object but each entry of the array will still point to the existing controls. Clone will not work for what you are looking for. You can try something like this; // See 1 below DEFINE VARIABLE oDesignerControl AS Infragistics.Win.Misc.UltraPanel NO-UNDO. // See 2 below DEFINE INPUT PARAMETER oDesignerControl AS System.Object NO-UNDO. Some LOOP Block: // 1. if type is known oDesignerControl = NEW Infragistics.Win.Misc.Ultralabel(). // 2. pass oDesignerControl control as System.Object and use DYNAMIC-NEW oDesignerControl = DYNAMIC-NEW oDesignerControl:GetType():ToString() (). // trying to remember this on top of my head if GetType() will return the derived class type name. If not use a string corresponding to the complete type name ( including namespace) of the control you are trying to create by just passing the type name as string to a method. // Add control to the form oDesignerControl:NAME = " " + STRING(i). ---- assign additional properties of oDesignerControl here like Text, Location and Size ---- THIS-OBJECT:Add(oDesignerControl). END.
Continue reading...
Continue reading...