chechedlistbox in contextmenustrip RRS feed

  • Question

  • Hi

    As you see in the subject i need to use CheckedListBox in Right click menu and don't know how to make it.

    is there any suggestions?

    here the sample that i need that.


    Sunday, May 27, 2012 9:18 AM


All replies

  • No i didnot mean that way. I know how to set the contextmenu property of an object to the created ContextMenustip object.

    I want to create an other object in ContextMenuStrip1. do you get me?

    as you know we can only create TextBox and ComboBox in a ContextMenu Object. please pay attention to the Subject. I want to create CheckedListbox in a ContextMenuStrip1.

    I also Attached a Picture of my request that shows the project.


    Sunday, May 27, 2012 9:43 AM
  • I believe what you are trying ot do is similar to creating a custom column in a DataGridView.  Normally a Data gridview will only use eith Text columns or Combboxes.  But you can also add a cutome object to the column.  so I did a search of "DataGridView custom column" and found a lot of the webpage below may help[

    In th ecode look especially at these tow functions

    1) public class StudentContactTypeDescriptionProvider : TypeDescriptionProvider

    2) public class StudentContactCCTypeDescriptor : CustomTypeDescriptor


    Sunday, May 27, 2012 11:47 AM
  • no it was not my answer too.

    First of all i should appreciate your answer about working with DataGridView and Customizing its columns.

    But My Friends I want to Customize the items of ContextMenuStrip Component. yes I know what i am saying because Microsoft has done it before then we can too.


    Sunday, May 27, 2012 12:38 PM
  • The principle is the same with the ContextMenuStrip and with a DataGridView column.

    Look at the sample code on this webpage

    The code uses statement like this


    menuItem3 can be any type object.  You need to create a class for you custom contextMenu1 and then add your new class as a menu item. 

    public class contextMenuCheck box Mycheckbox : Checkbox



    Sample code



    • Marked as answer by navidsoft Sunday, May 27, 2012 3:49 PM
    Sunday, May 27, 2012 1:23 PM