Updating menu item's 'checked' status

Hey guys,

Trying to get a component to update it’s nickname when an option is selected - as with the example below. I’m wondering what do I need to code to update the checkbox in the menu?

I’m assuming i’m missing something - cause i felt like it was working in an earlier iteration of the code.

using System;
using Grasshopper.Kernel;



namespace my_gha
{
    public class my_component : GH_Component
    {

        public my_component() : base("MY Component", "mc", "Stuff", "User", "Forum Question")
        {
        }

        public override Guid ComponentGuid
        {
            get { return new Guid("12ac74ea-cf57-4796-a702-38aa7e6e9048"); }
        }

        protected override void RegisterInputParams(GH_InputParamManager parameter_manager)
        {

        }

        protected override void RegisterOutputParams(GH_OutputParamManager parameter_manager)
        {

        }

        protected override void AppendAdditionalComponentMenuItems(System.Windows.Forms.ToolStripDropDown menu)
        {
            System.Windows.Forms.ToolStripMenuItem menu_item_a = GH_DocumentObject.Menu_AppendItem(menu, "A", menu_a_clicked);
            menu_item_a.ToolTipText = "Info about A.";
            
            System.Windows.Forms.ToolStripMenuItem menu_item_b = GH_DocumentObject.Menu_AppendItem(menu, "B", menu_b_clicked);
            menu_item_b.ToolTipText = "Info about B.";

            System.Windows.Forms.ToolStripMenuItem menu_item_c = GH_DocumentObject.Menu_AppendItem(menu, "C", menu_c_clicked);
            menu_item_c.ToolTipText = "Info about C.";
        }

        private void menu_a_clicked(object sender, EventArgs e)
        {
            RecordUndoEvent("A");
            this.NickName = "A";
            
            ExpireSolution(true);
        }

        private void menu_b_clicked(object sender, EventArgs e)
        {
            RecordUndoEvent("B");
            this.NickName = "B";
            ExpireSolution(true);
        }

        private void menu_c_clicked(object sender, EventArgs e)
        {
            RecordUndoEvent("C");
            this.NickName = "C";
            ExpireSolution(true);
        }

        protected override void SolveInstance(IGH_DataAccess data_access)
        {

        }

    }
}

The menu is created anew each time it is shown, so you need to set the checkmark inside AppendAdditionalComponentMenuItems().