MouseWheel event

A

Alberto

If I want to manage the event MouseWheel I can write a line like this in
the designer of a form, for example.

TabControl.MouseWheel += ...

but, does anybody know why this event doesn't appear in the controls
property window? You can see other events like MouseMove or MouseLeave
but MouseWheel isn`t there.

Thank you
 
M

Mick Doherty

The control must be focused in order for it to react to MouseWheel events.
By default a Panel cannot receive focus and so the MouseWheel event is not
listed in the events list.
 
F

Finn Stampe Mikkelsen

Mick Doherty said:
The control must be focused in order for it to react to MouseWheel events.
By default a Panel cannot receive focus and so the MouseWheel event is not
listed in the events list.

--

Could the form be set to catch all, like keypressed?? Then the eventhandler
could determine the action based upon mouse x/y and other variables...

/Finn
 
A

Alberto

El 22/12/2009 0:34, Finn Stampe Mikkelsen escribió:
Could the form be set to catch all, like keypressed?? Then the
eventhandler could determine the action based upon mouse x/y and other
variables...

/Finn
The problem isn't manage the mouse wheel event. The problem is how to
move the inner panel.
Thank you
 
P

Peter Duniho

Alberto said:
The problem isn't manage the mouse wheel event. The problem is how to
move the inner panel.

Then why did you post this:
If I want to manage the event MouseWheel I can write a line like this in
the designer of a form, for example.

TabControl.MouseWheel += ...

but, does anybody know why this event doesn't appear in the controls
property window? You can see other events like MouseMove or MouseLeave
but MouseWheel isn`t there.

?

That's exactly the question that David, Mick, and Finn are all
addressing, because that's exactly the question you asked.

And as for the question you apparently _meant_ to ask: why are you still
having a problem moving the inner panel, given that I already posted the
code you need to fix your problem?

Pete
 

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

Top