2020-02-26 05:22 AM
hello...
I am working on STM32L4R9AI-EVAL board..i want to detect the long touch..means in one screen if i do long touch it has to go to the other screen...I need deep explanation
how do i do this ....any example code
thank you
Solved! Go to Solution.
2020-03-06 06:03 AM
It was not done using the Designer, it's a class completely written by the programmer. Therefore, you will not see it in the Designer but only when you run the application. Every custom widget you create will not be displayed in the Designer.
customButtonContainer is an arbitrary name you can call it whatever you want.
/Alexandre
2020-03-09 12:53 AM
This a new file you have added into project ...or you have modified any existing file....
please mention where your doing it....and what is the result so that i can modify according to my application...
Thank you..
2020-03-09 03:45 AM
The customButtonContainer .hpp file is a completely added file. It is not generated by TouchGFX Designer.
It is added to [your project directory]/gui/include/gui/common/
/Alexandre
2020-03-09 05:25 AM
Thank you so much Alexandre RENOUX .....Glad it's working fine
2020-06-11 02:09 AM
Hi @prathima
You can also detect long touch in handleTickEvent if You use flexButton with Touch trigger.
Then You can detect how long is pressed the button.
Pseudocode:
bool btTouched;
uint32_t timeTouched; // variable for long touch time measurment
void buttonClicked() { // virtual function declared in TouchGFX designer
btTouched = true;
timeTouched = 0;
}
void screenView::handleTickEvent() {
if(myFlexButton.getPressed()) timeTouched += 16; // every tick has around 16ms
if(timeTouched>500 && btTouched) {
btTouched = false; // avoid retriggering
// do anything when 500ms elapsed
}
Regards,
R. Gajda
}