Invisible Event

  • Thread starter Thread starter Paul Cheetham
  • Start date Start date
P

Paul Cheetham

Hi,

I have created a custom component in c#, and I have added a new event to it.

I have a problem however in getting the event to show in the event list
in the properties window.

I have declared the event as follows:

public delegate void DownChangeDelegate(object sender, bool DownState);
public event DownChangeDelegate DownChanged;


I'm sure I must be missing something in order to make this visible, but
I've searched all over and everything I can find on events doesn't
mention anything about this.


Any help greatly appreciated.

Thanks.

Paul Cheetham
 
Paul,

Have you recompiled your code? This might be it. I imagine you already
have, but it's worth a shot.

There are a few things to note about what you did with the DownState
parameter:

- It should be cased in camel case to conform to the public naming
conventions.
- It should be named "e" to conform with the existing event pattern already
established.
- It should be a type derived from EventArgs which exposes a property
DownState, which will return the value of whether or not the state is set or
not.

Hope this helps.
 
Hi Nicholas,

Yes I have re-built my code several times - still nothing.

I can change the argument passing, but this shouldn't prevent it from
working should it?



Thankyou.


Paul
 
Back
Top