I know, I have already done this too, but I simply wish I didn't have to
reinvent the wheel all over again. Who knows what *common feature* I'll have
to implement next time?
Ovidiu.

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of
Tomas Restrepo
Sent: Monday, May 20, 2002 5:47 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Toolbar problem: Can't teach an old developer new
tricks?


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.

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