I am developing a Windows Smart Client application that needs to display a menu that changes based on things like the user's access, what is waiting in the user's inbox, etc.. I want the menu displayed as a list, in a hierarchical format, but without twisties or +/- symbols. I don't even want items to expand or collapse. I used the TreeView control for the menu but it has lots of bugs when dealing with different fonts and sizes for items in the list.
So, I have chosen to use a WebBrowser control because I can easily create the HTML I need to display the menu the way I want it to look. I have added a WebBrowser control to my form. I have code that generates the HTML for the menu, writes it to a local file, then tells the WebBrowser control to navigate to that "page". This displays the menu in a all its glory, looking just the way I want it to look.
Now this "menu" contains a bunch of Div tags with text in them. Some of them are clickable links the user can click on. For example, one menu item could be "Generate Letter". When the user clicks on the <A> tag wrapping the Generate Letter text I want to be able to handle this event with code on my form.
The problem is that I can capture events raised by the WebBrowser control itself, but not the events raised by the content in that control. Is there a way to do this?
I apologize but I accidentally left the following text in the HTML in my code snippet. The text should be removed