views:

2468

answers:

1

I want to create context menu in C# which items are images of different heights and widths.

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

If autosize for menu items is enabled, then heights of all menu items are the same. If I disable autosize for menu items, then I cannot properly set the width of context menu - it is not respecting widths of menu items.

+1  A: 

Hello, Goran. Please try this scenario:

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

HTH, Valve.

Valentin Vasiliev