Hi,
I wrote a custom event handler for a combo box control class. The
event handler itself works, it gets fired, I can define an event
handler in my form window and it gets called when I want to. But what
must be done so that this new event shows up in the controls event
property. I already marked the public event handler with attribute
[Browseable(true)], but it still gets not listed.
Typical beginners question...
TIA,
Stefan
Luc Kumps - 03 Mar 2008 13:18 GMT
> property. I already marked the public event handler with attribute
> [Browseable(true)], but it still gets not listed.
Did you try Restarting Visual Studio after modifying the component?
Or to re-install the component DLL in the Toolbox?
Luc K
Stefan - 04 Mar 2008 07:41 GMT
Yep - that did it. I'm not sure wether it was restarting VS2005-SP1 or
re-installing the DLL (guess that), but now I see my event. As a
beginner however I still feel "uncomfortable" why VS needs this "hard
refresh" to see the event...
Thanks again,
Stefan
> > property. I already marked the public event handler with attribute
> > [Browseable(true)], but it still gets not listed.
[quoted text clipped - 3 lines]
>
> Luc K
bolo - 08 Mar 2008 02:49 GMT
It's better to resolve it if paste your code here.
> Yep - that did it. I'm not sure wether it was restarting VS2005-SP1 or
> re-installing the DLL (guess that), but now I see my event. As a
[quoted text clipped - 11 lines]
>>
>> Luc K
Herfried K. Wagner [MVP] - 03 Mar 2008 15:52 GMT
"Stefan" <olympus_mons@gmx.de> schrieb:
> I wrote a custom event handler for a combo box control class. The
> event handler itself works, it gets fired, I can define an event
> handler in my form window and it gets called when I want to. But what
> must be done so that this new event shows up in the controls event
> property. I already marked the public event handler with attribute
> [Browseable(true)], but it still gets not listed.
My guess is that the event window only shows event handlers which are set up
in the 'InitializeComponent' method.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>