Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Operation of MouseWheel event when LMDEdit selected but cursor not on LMDEdit field

Hi,

I mistakenly put this into the LMD IDE-tools by mistake and have moved it here.

I am upgrading from C++ BDS 2006 and LMD tools 7.12 to C++ RAD Studio XE10.1 Berlin and LMD tools 2016.6.

In BDS 2006 / LMD 7.12, after I clicked on an LMDEdit field to select it with a LeftMouseButton click, I could increment and decrement the numbers in that field by moving the mouse wheel by evoking the OnMouseWheel event.  Most importantly, after the LMDEdit was selected and had focus, the mouse CURSOR did NOT HAVE TO BE ON the LMDEdit field to increment or decrement the number.

In RAD Studio XE 10,1 and LMD 2016, after I clicked on an LMDEdit field to select it with a LeftMouseButton click, I could still increment and decrement the numbers in that field by moving the mouse wheel by evoking the OnMouseWheel event.  However, NOW after the LMDEdit was selected and had focus, the mouse cursor HAD TO BE ON the LMDEdit field to increment or decrement the number.  My users found this to be harder to use and a definite backward step in ease of use.

Is there any way (like changing or using a MouseWheel property or method) that I could restore the mouse wheel operation from the LMD 2016 cursor HAS TO BE ON  the LMDEdit field to the LMD 7.12 cursor does NOT HAVE TO BE ON the LMDEdit field as long as the LMDEdit is selected and has focus?

Thank you.
Bill Anderson

Comments

  • 6 Comments sorted by Votes Date Added
  • This aspect seems to be changed in newest Delphi versions. I've just checked latest sources with XE2 (in which lmdedit worked fine as you want) and Delphi 10.1 (in which same code does not work).

    We do not do any processing inside our code, just publish VCL's event.
  • Hi Eugene,

    So presumably Embarcadero's TEdit has changed?


    My understanding is that the OnMouseWheel event can theoretically operate in three ways

    1) The mouse wheel only increments/decrements the Edit field when the Edit field is selected (ie has focus) and the mouse cursor is ON the Edit field (ie XE10.1).

    2) The mouse wheel only increments/decrements the Edit field when the Edit field is selected (ie has focus), but and the mouse cursor can be ANYWHERE ON the screen (ie XE 2).

    3) The mouse wheel only increments/decrements the Edit field when it is HOVERING over the Edit field, irregardless of what is selected (ie has focus).  If the mouse is moved to hover over a different component, then that new component will be incremented/decremented by the OnMouseWheel event.


    Surely to control such loose behavior, there must be a method or property that can control the OnMouseWheel behavior?  You have a much better idea than me.


    Sincerely,

    Bill Anderson

  • At Windows level (WM_MOUSEWHEEL) item 3 from your list is valid: WM_MOUSEWHEEL message only sent to hovering control, irregardless of the forcus, because its mouse event only.
    However, Delphi makes things much more tricky, just like with keyboard focus: the control re-route WM_MOUSEWHEEL to its parent form, and then, the form search for suitable control to fire Delphi's part of message processing, including, finally, OnMouseWheel event.

    Do some standard controls work as you want in XE 10.1?
  • Hi Eugene,

    Yes, the standard controls work as I want in XE 10.1.

    I will email Embarcadero about control of OnMouseWheel for TEdit.

    Sincerely,

    Bill Anderson

  • edited August 2017 Posts: 0Vote Up0Vote Down

    > Yes, the standard controls work as I want in XE 10.1.

    Are you sure? I just checked with TEdit, and it NOT receive the event if the mouse is outside the control.
  • Hi Eugene,

    I agree that you are probably correct on TEdit. For Standard controls I thought you meant keyboard. It really looks like Embarcadero or Microsoft made the "improvement".

    I'll abe out of f the office for awhile unable to respond to emails.

    Sincerely,
    Bill Anderson
Sign In or Register to comment.