Hide some event

  • Thread starter Thread starter cfyam
  • Start date Start date
C

cfyam

I made a new UserControl, and I want to hide some event (like click..) when
the other user use the control view the property page! How can I do?
 
I tried a few things and it doesn't look easy.

If you just want to hide the event from the designer set the Browsable
attribute in the derived class:
[Browsable(false)]
public new event EventHandler Click;

Otherwise, if you needed to completely remove it from the interface:
Maybe hack the IL? Or inherit from Component, but that would strip you of
lots of base functionality.


HTH;
Eric Cadwell
http://www.origincontrols.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top