No announcement yet.

Winbutton only accepts touch on top right corner !!

  • Filter
  • Time
  • Show
Clear All
new posts

  • Winbutton only accepts touch on top right corner !!


    I am using gen4-uLCD-32DT board. I have 6 forms right now, each form has 3 Winbuttons (for navigation to different screens). Form 6 has some more Winbutton. These extra winbuttons are showing a peculiar behavior. A TOUCH_PRESSED and TOUCH_RELEASED is detected for the button only their right-top corner !

    When some of these buttons are small in size and placed adjacent to other winbuttons, pressing/releasing at the exact top-right corner is difficult and most of the time impossible for our regular user.

    Why such behavior? These Winbutton properties are exactly same as the Winbuttons used for screen navigation. There I dont have this issue.

    I found out about this by printing the index of the image touched. like this
    _n := img_Touched(hndl, -1);

    then I check if _n == iWinbutton19. Here it invariably fails unless. _n comes out to be 0 or something else random.
    When the touch is at the top right corner, then it passes!!

    What might be going wrong? I am stuck here.

    Your prompt help shall be highly appreciated.

    Thanks and Best regards,
    Vishal Sapre

  • #2
    Hello Vishal,

    Would it be possible to send us your project so we can see what is causing this. I have sent you a PM.

    Best regards



    • #3
      Hi Pauleilio,

      I have sent you the project from my official email.

      Look forward to your prompt help.

      Thanks and best regards,


      • #4
        Hi Vishal,

        Thank you for that. I will get to it right away.

        Best regards



        • #5
          Hi Vishal,

          Thank you for the latest code, it worked this time.

          It appears that not all previous winbutton's touch attributes are being cleared before new buttons are displayed and touch enabled.

          I have fixed the problem by adding this to disable all winbuttons before displaying and enabling new buttons.

          for(td := 0; td < 18; td ++)
          img_SetAttributes(hndl, iWinbutton1+td, I_TOUCH_DISABLE);

          Added this just after gfx_Cls(); each time you change a form.

          Best regards