cmsListBox = new ContextMenuStrip(); cmsListBox.Items.Clear(); cmsListBox.Opening += new System.ComponentModel.CancelEventHandler(cmsListBox_Opening); listbox_font_size = new ToolStripMenuItem("Font Size"); cmsListBox.Items.Add(listbox_font_size); listbox_font_size.DropDownItems.Add("10"); listbox_font_size.DropDownItems.Add("12"); listbox_font_size.DropDownItemClicked += new ToolStripItemClickedEventHandler(Listbox_Font_Size_Menu_ItemClicked); ToolStripMenuItem listbox_expander_bar_vertical_size = new ToolStripMenuItem("Expander Vertical Size"); cmsListBox.Items.Add(listbox_expander_bar_vertical_size); listbox_expander_bar_vertical_size.DropDownItems.Add("200"); listbox_expander_bar_vertical_size.DropDownItems.Add("400"); listbox_expander_bar_vertical_size.DropDownItemClicked += new ToolStripItemClickedEventHandler(Listbox_Expander_Bar_Vertical_Size_Menu_ItemClicked); listBoxTopLevelChecklist.ContextMenuStrip = cmsListBox; ContextMenuStrip cms = (ContextMenuStrip)sender; foreach (ToolStripMenuItem item in cms.Items[0]) { foreach (ToolStripMenuItem dditem in item.DropDownItems) { dditem.Checked = true; } {
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)