vb.net - VB .net Context/ToolStripMenu at runtime -
i have contextmenu in this picture. want add says ".rtf" more menuitems @ runtime. cant seem make it...
dim mycontextmenu contextmenustrip = form1.mnuoptions dim mymenuitem toolstripmenuitem = mycontextmenu.items("sendto") dim mysubmenuitem new toolstripmenuitem = mymenuitem.dropdownitems("file").subitems
this how imagine doing it, not work of course because there no ".subitems". take accomplish such easy job?
and how can set addhandlers each subitem procedure?
assuming 'file' name of menu item text, can access directly it's name, , add dropdown item collection:
file.dropdownitems.add("pdf")
one of add overloads allows indicate event handler click fire.
Comments
Post a Comment