[.net] Context Menu Images

Started by
2 comments, last by mutex 18 years, 8 months ago
What ways are there for me to put images next to the text in my context menus in C# 2005? Is it even possible?
Advertisement
The "standard" way is to OwnerDraw your own derived MenuItem. Since that's nasty and requires a lot of individual drawing operations, the cleaner but slightly more complicated solution is to use an IExtenderProvider, as shown here and here. Additionally, you could also use a third-party menu control. There are many cheap (< $100) GUI object suites out there, if you're working on a minimal budget. Or if you're on a big project, there's the big names like Infragistics and Syncfusion.
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
Thanks that helped me a lot! Another question though, what about using the ContextMenuStrip control instead?
The new *MenuStrip controls in .NET 2.0 let you add images, and are more powerful than the old menu controls.

This topic is closed to new replies.

Advertisement