Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
(C#) Raise an Event
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01016081
Message ID:
01016267
Views:
15
>I think I've found a need to raise the MenuItem.Popup event. What's the easiest way to do this?
>
>My reason for needing to raise the event is posted in message ID 1015136, so maybe there's a better solution.
>
>Thanks,
>Mike

Mike, does the following work for you?

You use "+=" operator to add an event handler to an event such as Popup
MainMenu menu = new MainMenu ();
MenuItem item = menu.MenuItems.Add ("&Options");
item.Popup += new EventHandler (OnPopupOptionsMenu); 

private void OnPopupOptionsMenu (object sender, EventArgs e)
{
///Do something here
}    
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform