TouchGFX designer, Flex button or any other option available for Long Press of Touch button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-06 11:30 PM
Hello All,
I am new TouchGFX and working on it recently, I am trying to implement Long Press (if user touches button continuously) to increment value on Text Area, continuously until user releases flex button press.
Right now, the configuration for flex button to trigger is for Click, I can see option for Touch as well but it's not working as intended. I can see the value update every Click but need to have value to increase as long as User Touch is Pressed.
Would appreciate, any guidance or some references to try out to do it.
Br,
Shiv
Solved! Go to Solution.
- Labels:
-
TouchGFX Designer
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-10 7:02 AM
Hello @ShivDesh,
You can refer to this post Solved: Re: Repeat Button triggers immediately, bug or fea... - STMicroelectronics Community.
BR,
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-09 11:51 PM
Hello Team,
Any suggestion or direction to try and experiment with for the flex button long press fixes?
Regards,
SD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-10 1:29 AM - edited ‎2025-03-10 1:35 AM
you can do it with normal buttons. you have to create one interaction that gets triggers with every N tick and executes c++ code. there you can check button state by calling this button.getPressedState() function, you can check button is pressed or not if pressed you can increament variable continusly. check following example:
if(buttonUp.getPressedState()){
uint16_t CrntVal = textProgress1.getValue();
CrntVal++;
textProgress1.setValue(CrntVal);
}
if(buttonDw.getPressedState()){
uint16_t CrntVal = textProgress1.getValue();
if(CrntVal > 0)
CrntVal--;
else
CrntVal =0;
textProgress1.setValue(CrntVal);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-10 7:02 AM
Hello @ShivDesh,
You can refer to this post Solved: Re: Repeat Button triggers immediately, bug or fea... - STMicroelectronics Community.
BR,
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-17 5:38 AM
Hello @jumman_JHINGA
Thanks for the direction you have provided, yes after some required modifications, this concept did work as expected. Thanks again.
