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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -