cancel
Showing results for 
Search instead for 
Did you mean: 

Scroll Menu container with hardware keys

GB.1
Associate

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.

3 REPLIES 3
ktrofimo
Senior III

Look similar topic here: ​https://community.st.com/s/question/0D53W00000rZDA3SAO/how-to-emulate-touchgfx-touch-input-using-hardware-buttons-especially-in-scroll-list

MM..1
Chief II

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();
}

GB.1
Associate

Thank you very much.