Title: Programmatically removing controls from a form


Hello,


As it is possible to programmatically add controls to a form at runtime, is it also possible to remove controls, instead of making them invisible?

I am using Axapta 3.0 sp2.



I have tried using the following code, with no luck.  Can anyone tell me exactly what the CUT() method is supposed to do?



private
void
    ClearGroup
    (
        int                         Level
    )
{
    Object                          Obj;
    FormGroupControl                FGC;
    int                             NumControls, i;
    ;


    FGC             = this.DetermineGroupEffected(Level);
    _FormRun.lock();
    if (FGC) {
        NumControls     = FGC.controlCount();
        for (i=1;i<=NumControls;i++) {
            obj         = FGC.controlNum(i);
            print obj.Name();
            obj.Visible(False);
            obj.Cut();
        }
        print "";
        print "";
    }
    _FormRun.unLock();
}






This email contains information from G&S Engineering Services Pty Ltd, G&S Services Electrical Pty Ltd or BIGmate Monitoring Services Pty Ltd (the G&S Group) that may be confidential and/or priviledged and/or contain information which may only be disclosed with the consent of the individual concerned pursuant to the Privacy Act 1988. Only the intended recipient may access or use the information. If you are not the intended recipient, please delete this email and notify the G&S Group immediately.  Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of the G&S Group shall be understood as neither given nor endorsed by G&S.



Sharing the knowledge on Axapta.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to