cancel
Showing results for 
Search instead for 
Did you mean: 

ScrollList : Change Color/Draw rectangle Selected item

Karan 123
Senior

Hi,

I am using scroll List and also able to select the item by clicking that and tested that on simulator. Please check below image .

0693W000000X8luQAC.png

Screen1View::Screen1View() :
	scrollList1ItemSelectedCallback(this, &Screen1View::scrollList1ItemSelectedHandler)	    
{
 
}
void Screen1View::scrollList1ItemSelectedHandler(int16_t itemSelected)
{
	touchgfx_printf("Item Selected = %d \r\n" ,itemSelected) ;
	touchgfx_printf(Rx_Buffer1[itemSelected]) ;
      // Which API should I use ..
	touchgfx_printf(" \r\n" ) ;
}
 
void Screen1View::setupScreen()
 {
	  Screen1ViewBase::setupScreen();
	  scrollList1.setItemSelectedCallback(scrollList1ItemSelectedCallback);  // Added
 
}

How do I change color of Clicked Item (Text) or put rectangle over that .

Means which API should I use .?

--

Karan

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello,

Here is an example on how to modify elements of an item (change color, change text, etc.) in a ScrollList when this item is being clicked.

Hope this will help.

/Alexandre

View solution in original post

8 REPLIES 8
Alexandre RENOUX
Principal

Hello,

Here is an example on how to modify elements of an item (change color, change text, etc.) in a ScrollList when this item is being clicked.

Hope this will help.

/Alexandre

Karan 123
Senior

Many of Thanks ..

Karan 123
Senior

Here is output video on simulator .

Good 🙂

Hope your project will move forward now.

/Alexandre

Karan 123
Senior

Hi,

@Alexandre RENOUX (ST Employee)

Thanks for your appreciation ..

But As I have worked on LED,Button with FreeRTOS for Interfacing with hardware in TouchGFX Applications single bit .

ADC , UART as well .

But How to send USB File Names from (2D Array or any other means) to List items with FreeRTOS Queue .

I don't find any demo like that.

2DArray_USB_FILE_Names_Queue_Model_Presenter_View_List_Item.

Can you look attached file ... is it the right way ?

--

Karan

Hello,

As it is a different topic, could you please create a new post for this issue.

Thank you in advance,

/Alexandre