nearest widget touch?

  • Touch screen is working well if a touch is done inside the widget area.
    I wonder if it is possible to have a touch event if the touch is near the widget, so if user touches the screen, a touch event will be triggered for the nearest widget.
    Is this possible?
    Thansk
    Johanan

  • Hi,

    I could catch the touch input from the parent and route it to the widget which is the nearest.

    Take a look into the example I have attached. I catch the touch input in the callback of the desktop window and check if it close enough to a widget. If it is I pass the touch message to the widget.

    But be aware of the fact that this might not work reliable because different widgets react differently on touch input. For the BUTTON it works quite well but it is not possible to place the cursor of an EDIT widget using this method.

    Regards
    Sven

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!