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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top