
HELP!!! raising events from a custom control
hi,
making command button public will expose only the
properties and methods..how do u make it to expose its
events(as it does properties and methods)
when we delegate the events, we have to delegate each and
every events individually , right?
Quote:
>-----Original Message-----
>> i have a custom control .... which inturn has a control
in
>> it , say a command button (command button is dragged and
>> dropped on custom control screen , custom contro is not
>> inherited by command button) and like this i also have
few
>> more windows form controls in my custom control.
>> now if i drag and drop my custom control on any form, it
>> will expose only those events which i have explicitly
>> declared in my custom control. along with my custom
custom
>> events i have defined , i also want my control to
expose
>> all the events of command button( any windows form
>> control , for that matter) that i have dropped on my
>> custom control screen.
>> one way is to, handle all the command button events in
my
>> custom control and in turn raise a custom event which
will
>> have to be handled by client form on which the custom
>> control is placed ... but it is a major task..is there a
>> simple way of exposing all the events of a windows form
>> control in my custom control
>As your control is not a command button, you have to a)
delegate all the
>events or b) make the command button public so that
clients of your control
Quote:
>can handle the events of the button.
>Armin
>.