How do I create a ContextMenuStrip in C # which elements are images?

I want to create a context menu in C # whose elements are images with different heights and widths.

Main problem. I don't know how to decide how to set the width and height for the menu items and context menu.

If autosize is enabled for menu items, then the heights of all menu items are the same. If I turn off auto-collating for menu items, then I cannot set the width of the context menu correctly - it does not match the width of the menu items.

+1


source to share


1 answer


Try this scenario:



this.toolStripMenuItem2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;

      

+1


source







All Articles