Recent

Author Topic: lazarus bubbling events  (Read 1228 times)

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 344
lazarus bubbling events
« on: May 18, 2024, 03:20:24 pm »
Borrowed this term from javascript.

TPanel, on top TEdit, both have event OnMouseWhellUp.

Move mouse ower TEdit, roll MouseWhellUp, both events gets executed. Probably goes down to form.

Is that expected and out curiosity, can it be turned off.
lazarus 3.2-fpc-3.2.2-win32/win64

jamie

  • Hero Member
  • *****
  • Posts: 6798
Re: lazarus bubbling events
« Reply #1 on: May 18, 2024, 03:49:05 pm »
Yes, that is how it works. MouseWheel messages get sent downwards.

If you want to stop that, then in the top control, let's say the TEDIT here, set the HANDLED:= True in the mouse-wheel event.
The only true wisdom is knowing you know nothing

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 344
Re: lazarus bubbling events
« Reply #2 on: May 18, 2024, 10:07:41 pm »
Thanks.
lazarus 3.2-fpc-3.2.2-win32/win64

 

TinyPortal © 2005-2018