context menus with icons

  • Thread starter Thread starter Matt Michael
  • Start date Start date
M

Matt Michael

Hi, is there any way to add menu items to a context menu with icons next to
them. When I declare a menuitem, it does not seem like there is a .icon
property or anything similar or intuitive like that. An example that
illustrates this is right clicking on your desktop, choosing "New", and for
each type of file it displays a different icon next to it. Thanks for your
help!
 
Hi, is there any way to add menu items to a context menu with icons next to
them. When I declare a menuitem, it does not seem like there is a .icon
property or anything similar or intuitive like that. An example that
illustrates this is right clicking on your desktop, choosing "New", and for
each type of file it displays a different icon next to it. Thanks for your
help!

You would have to inherit from the MenuItem class and add an image
property, then Override the OnPaint method to draw the icon where you
want it.

Hope this helps

Blu.
 
Back
Top