cancel
Showing results for 
Search instead for 
Did you mean: 

Long pression with incremental speed suggestion

MPast.1
Senior II

based on this  discussion: https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/long-press-button-increment-fast-value/m-p/101030 

I would like to implement an autoincrement mode by using "repeat button" and/or  "flexbutton".

I'm trying to understand how is possibile catch the tick of the first button pression, and at the same time I need a way to understand easily the release tick. (for each button)

In this way,  it will possibile to realise a fast increment systems on our variables.

I:E.

  • if button pression time < 500ms, then = variabie + 1 (single step);

  • if 500ms < button pression time < 5000ms = variable + 100, (step every 200ms);
  • if button pression time > 5000ms = variable + 1000, (step every 200ms);

  • if button releae = stop increment

I would like to avoid the implementation for each buttons, all the timing controls check on handleTickEvent callback.

(I have more than 100 buttons on the project).

So if someone has some different idea, to realize it , please reply to this post.

 

So I suggest the possibility with "repeat button" and "flexbutton" to have the release callback function directly from touchgfx stack. It will be nice to configure the callback on pression or on release.

 

0 REPLIES 0