Skip to main content
Karan 123
Senior
May 8, 2020
Solved

ScrollList : Change Color/Draw rectangle Selected item

  • May 8, 2020
  • 8 replies
  • 3229 views

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

This topic has been closed for replies.
Best answer by Alexandre RENOUX

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

8 replies

Alexandre RENOUX
Alexandre RENOUXBest answer
Visitor II
May 12, 2020

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
Karan 123Author
Senior
May 12, 2020

Many of Thanks ..

Karan 123
Karan 123Author
Senior
May 12, 2020

Here is output video on simulator .

Alexandre RENOUX
Visitor II
May 13, 2020

Good :)

Hope your project will move forward now.

/Alexandre

Karan 123
Karan 123Author
Senior
May 13, 2020

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

Alexandre RENOUX
Visitor II
May 14, 2020

Hello,

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

Thank you in advance,

/Alexandre

Karan 123
Karan 123Author
Senior
May 14, 2020