nearest widget touch?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 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
      Files
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.