How to add submenu items to menuitems

后端 未结 4 998
旧巷少年郎
旧巷少年郎 2021-01-02 09:33

I have created a Table layout in windows forms as shown in figure, i have added a right mouse button click Menu to my table,

i wnt to add submenu items to following

4条回答
  •  無奈伤痛
    2021-01-02 10:17

    You can add MenuItems to existing MenuItem like:

    MenuItem addDevice = new MenuItem("Add Device");
    addDevice.MenuItems.Add( new MenuItem("Add More .."));
    

    It would be visible like:

    enter image description here

提交回复
热议问题