Hello Lynn,
You'll have to set the MenuItems OwnerDraw property to true, and then write
some code on the DrawItem and MeasureItem events to draw the menu items by
yourself.
Unfortunately (please take note .NET guys!) there is no "Tag" property on
the MenuItem class as to redirect all menu items events to the same handlers
and use the Tag as an index to an ImageList. So I guess you'll have to:
* Write a specific draw event for each item
-or-
* Somehow use the sender index (if rational) to address the image to draw
-or-
* Create your own class inheriting from MenuItem in a sepparate dll that
Adds ImageList and ImageIndex property and do the drawing.
To draw the item, you'll have to use the passed DrawItemEventArgs in the
DrawItem handler, that has a graphics object to use to draw plus some handy
methods as to fill the background with the proper colors, get the text color,
etc.
As mentioned above, you will also need to write a handler for MeasureItem as
to tell to Windows to add the extra space the bitmaps will take.
Hope it helps.
Libertadrian
"Give me freedom or give me death"
"Lynn Morrison" wrote:
I cannot find this feature at all. There is no bitmap property for menu
items nor is there an imagelist property for the menu itself...
How do I put images to the left of menu items?
Thanks,
Lynn