How to disable/enable ribbonitem

Aug 26, 2014 at 5:34 PM

I would create an mdi application that when I select a ribbonitem to load an mdi childform I disable others ribbonitems and when I leave this mdi child form by clicking "Ok" or "Cancel" buttons in the form I enable again disabled ribbonitems.

In the main form I do this :
   private void rBtnActivityFou_Click(object sender, EventArgs e)
        // ---- Disable ribbonItem
        this.rBtnActivityAcheteur.Enabled = false;
        foreach (Form f in this.MdiChildren)
            if (f.GetType() == typeof(FormFournisseur))
        FormFournisseur EcranFournisseur = new FormFournisseur(this);
        EcranFournisseur.MdiParent = this;
But I don't know how to enable rBtnActivityAcheteur when leaving this form.

Thanks a lot I you can help me.

PS : Sorry for my english.