2021-06-15 11:12 AM
Hi there, i'm really new to touchgfx and stm32 ecosystem and working on a project with multiple screens, were all has to be controlled with hardware buttons, the polling function for the buttons it's already implemented in a separate task and working (i can change screen back and forth using touchgfx interaction), but i'm really stuck on how to use the buttons to scroll and then select items on the container (container already implemented and showing the correct elements and it works using touchscreen on a 32F746G DISCO board). Any suggestion? Just as a notice i'm really ok in C programming but still learning C++
Thank you very much, Best Regards.
2021-06-15 11:16 AM
Look similar topic here: https://community.st.com/s/question/0D53W00000rZDA3SAO/how-to-emulate-touchgfx-touch-input-using-hardware-buttons-especially-in-scroll-list
2021-06-15 11:28 AM
Some example
void Screen4View::curup() {
scrollList1.itemChanged(cursorpos);
if (cursorpos > 0) {
cursorpos--;
} else {
cursorpos = scrollList1.getNumberOfItems() - 1;
scroll_flag = true;
}
scrollList1.animateToItem(cursorpos, 50);
scrollList1.itemChanged(cursorpos);
scrollList1.invalidate();
}
2021-06-18 12:01 AM
Thank you very much.