Ovidiu,


> As about your example, I have to say that you got it wrong: I wished for a
> button class that could *raise* events, not a class that could *handle*
> events. This way, I wouldn't have to hold Parent references, as you
suggest,
> but the toolbar would hold the buttons and the view, the doc (assuming I'm
> using a MFC-like doc-view model) or the main app would connect handlers to
> the buttons' events.

None of this is particularly hard to implement on the default toolbar class.
I even have a small extended class that allows this to happen: Raise events
from the toolbar's buttons when they are clicked. I even went one step
further and allowed toolbar buttons to be hooked up to corresponding menu
items so that you would only need to write a single event handler, much like
you do in mfc...

--
Tomas Restrepo
[EMAIL PROTECTED]

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to