Senior
May 5, 2020
Solved
Scroll List :Select (Highlight) on Click , Remove and Add Elements How to?
- May 5, 2020
- 11 replies
- 6778 views
Hi,
I am working on STM32746-DISC Board . I am working with "container" feature of TouchGFX with Scroll List . I have successfully update array elements (Hard Coded) as List Elements as per below link.
https://support.touchgfx.com/docs/tutorials/tutorial-04
// In Screen1View.hpp
void Screen1View::scrollList1UpdateItem(MenuElement& item, int16_t itemIndex)
{
touchgfx_printf("Update Item = %d\n" ,itemIndex ) ;
item.setNumber(itemIndex);
}// In MenuElement.hpp
const char Rx_Buffer1[11][20] = { "LIST.txt", "HELLO.png", "TouchGFX.gif", "STM32F7.doc", "SCROLL.bmp","NEW.xlsx", "TRY.jpg", "GOOD.bmp", "ABC.png", "XYZ.bmp" };
void setNumber(int no)
{
touchgfx_printf("setNumber = %d\n" ,no) ;
Unicode::itoa(no, textArea3Buffer, TEXTAREA3_SIZE , 10);
Unicode::strncpy(textArea3Buffer ,( const char *) Rx_Buffer1[no] , TEXTAREA3_SIZE -1 );
}

I want to know:
1) Is the right method ?
2) How to Select/Highlight File Name once item is clicked .
and send Selected item (File name) to touchgfx_print windows?
3) How to add/remove the Element (File Name) from List from some other button ?
Please see short video..
--
Karan
