MouseWheel event

  • Thread starter Thread starter Alberto
  • Start date Start date
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
 
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.
 
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
 
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
 
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
 
Back
Top