inputpanel event sender

  • Thread starter Thread starter Mart
  • Start date Start date
M

Mart

I have an inputpanel_EnabledChanged event handler.
But in the event handler the sender argument is always <undefined value>
when I activate the inputpanel.

When I have a button.Click and point to the same event handler (the one of
the inputpanel), I do get a value for the sender.
What's the diference? How do I know if the inputpanel fired the event?
I don't give args when I declare the event, I do it like this:
inputPanel1.EnabledChanged += new EventHandler(inputPanel1_EnabledChanged);
button1.Click += new EventHandler(inputPanel1_EnabledChanged);

Any ideas?

Thanks in advance!
 
You are right, the sender of EnabledChanged event handler is always null
(to tell the truth, I don't know why it is null). But event still fires
and you will be notified about EnableChanged event.

Why do you think that a null value is a problem for you?
 
I am using some kind of framework. Every form has a SIP control and just 1
overall eventhandler. I need to know which form matches this inputpanel
because then I know which components to scroll on my form.

Mart.

Sergey Bogdanov said:
You are right, the sender of EnabledChanged event handler is always null
(to tell the truth, I don't know why it is null). But event still fires
and you will be notified about EnableChanged event.

Why do you think that a null value is a problem for you?

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

I have an inputpanel_EnabledChanged event handler.
But in the event handler the sender argument is always <undefined value>
when I activate the inputpanel.

When I have a button.Click and point to the same event handler (the one
of the inputpanel), I do get a value for the sender.
What's the diference? How do I know if the inputpanel fired the event?
I don't give args when I declare the event, I do it like this:
inputPanel1.EnabledChanged += new
EventHandler(inputPanel1_EnabledChanged);
button1.Click += new EventHandler(inputPanel1_EnabledChanged);

Any ideas?

Thanks in advance!
 
Back
Top