• AVR Freaks

Hot![solved] Button does not get touch event inside a panel

Author
marelcom
Starting Member
  • Total Posts : 36
  • Reward points : 0
  • Joined: 2018/01/17 03:18:47
  • Location: 0
  • Status: offline
2019/10/02 07:03:31 (permalink)
0

[solved] Button does not get touch event inside a panel

Hi
 
In my project (MPLABX=v5.25, XC32=v2.30, Harmony=v2.06), I placed buttons inside a panel widget. When touching a button, it does not get the touch event.
As soon as the button is moved outside the panel widget (in the widget tree) and placed directly under the "Layer0" object, the button is working as expected.
 
Inside the touch driver (custom driver GT911), this function is called to send the touch envents to the libaria library:
Obj->touchMsg->param0) 
{
    case EVENT_RELEASE:
        laInput_InjectTouchUp(SYS_TOUCH_INDEX_0, dObj->touchMsg->param1, dObj->touchMsg->param2);
        break;
    case EVENT_PRESS:
        laInput_InjectTouchDown(SYS_TOUCH_INDEX_0, dObj->touchMsg->param1, dObj->touchMsg->param2);
        break;
    case EVENT_MOVE:
        laInput_InjectTouchMoved(SYS_TOUCH_INDEX_0, dObj->touchMsg->param1, dObj->touchMsg->param2);
        break;
    default:
        break;
}

 
Has somebody any idea, why the button inside a panel widget does not work?
It looks like, that the touch event is not forwarded through a panel. Do I have to turn on something?
 
Thanks
Markus
post edited by marelcom - 2019/10/04 01:16:17
#1

2 Replies Related Threads

    marelcom
    Starting Member
    • Total Posts : 36
    • Reward points : 0
    • Joined: 2018/01/17 03:18:47
    • Location: 0
    • Status: offline
    Re: Button does not get touch event inside a panel 2019/10/04 01:15:57 (permalink)
    0
    I solved it by myself.
    I did add an object to show the touch position for debug reason. This object was moved at first to the touched position and later the touch event were handled by the system. So this object higher in the object tree hirachry than the panels but lower than the other objects directly under the Layer0 obejct.
     
    Sorry for that.
    #2
    PastrelloMarco
    Starting Member
    • Total Posts : 67
    • Reward points : 0
    • Joined: 2013/08/30 12:26:20
    • Location: Venezia, Italy
    • Status: offline
    Re: Button does not get touch event inside a panel 2020/05/25 06:32:01 (permalink)
    0
    Hi,
     can you share to me your GT911 driver . I have the same configuration og Harmony, compiler and MPLABX.
    I would like to accelerate the development od GT911 driver coping your file.
    Can you share them with me?
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5