Tuesday, May 22nd 2018, 11:44pm UTC+2

You are not logged in.

  • Login
  • Register

aaa1

Beginner

Date of registration: Mar 8th 2018

Posts: 16

1

Wednesday, May 2nd 2018, 2:49pm

Listview: no touch screen

Hello,
I have a listview where I just want to show data with a background color of my choice. I want to avoid the cells to color themself every time I touch on one of them. I tried with LISTVIEW_EnableCellSelect(hItem, 0) but the cells still light up if touched.

Any other way to do so?
thanks!

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584

2

Friday, May 4th 2018, 11:01am

Hi,

You can change the background and the text color of the LISTVIEW items to the color used for an unselected items.

Try to configure your LISTVIEW like this (hItem is the handle of the LISTVIEW):

C/C++ Source code

1
2
3
4
	LISTVIEW_SetBkColor(hItem, LISTVIEW_CI_SELFOCUS, GUI_WHITE);
	LISTVIEW_SetBkColor(hItem, LISTVIEW_CI_SEL, GUI_WHITE);
	LISTVIEW_SetTextColor(hItem, LISTVIEW_CI_SELFOCUS, GUI_BLACK);
	LISTVIEW_SetTextColor(hItem, LISTVIEW_CI_SEL, GUI_BLACK);


But this way you won't see which item is selected.

Regards,
Sven