Occurs when when the property of a menu item is set to true and a request is made to draw the menu item.
The following declaration shows the syntax for a method that handles the DrawItem event.
[Visual Basic] Private Sub MenuItemName_DrawItem( _ ByVal sender As Object, _ ByVal e As DrawItemEventArgs _ ) [C#] private void MenuItemName_DrawItem( object sender, DrawItemEventArgs e ); [C++] private: void MenuItemName_DrawItem( Object* sender, DrawItemEventArgs* e ); [JScript] private MenuItemName_DrawItem( sender : Object, e : DrawItemEventArgs );
Property | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
The DrawItemEventArgs argument passed to a OnDrawItem event handler provides a System.Drawing.Advanced.Graphics object that allows you to peform drawing and other graphical operations on the surface of the menu item. You can use this event handler to create custom menus that meet the needs of your application.
MenuItem Class | MenuItem MembersTopic | System.WinForms Namespace