Languages

Menu
Sites
Language
ListView item checked during creation

Hello

I have problem with creating ListView item and make it checked.

In function CreateItem(int index, int itemWidth) I'm calling:

__pList->SetItemChecked(index, true);

But it doesn't make list item checked.

Any ideas?

Thanks
Kamil

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

10 Replies
tizendevteam T
We also observed the same issue and this issue will be fixed in the next release.
Ram Sahu
The icon list view has one of the following styles: so check which style of list view you are using. ICON_LIST_VIEW_STYLE_RADIO allows only one item to be selected. ICON_LIST_VIEW_STYLE_MARK allows multiple items to be checked. ICON_LIST_VIEW_STYLE_NORMAL does not allow any items to be selected or checked.
Kamil N
@Ram Sahu I checked LIST_ANNEX_STYLE_ONOFF_SLIDING and ICON_LIST_VIEW_STYLE_MARK. @tizendevteam Great! Some additional info: When I call setItemChecked later (after some event) it works fine. Also with the same scenario setItenEnabled doesn't work. Thanks Kamil
Pushpa G
I tested Listveiw in UiControls sample app->ListViewForm.cpp, Both __pList->SetItemEnabled(1,true); and __pList->SetItemEnabled(1,false); worked accordingly in the listview output in emulator.
Kamil N
Did you put this code into CreateItem function?
Pushpa G
Yes, i used it in CreateItem function of UiControls sample app->ListViewForm.cpp
Kamil N
I did the same in ListViewForm.cpp case 1: style = LIST_ANNEX_STYLE_MARK; pItem->Construct(itemDimension, style); pItem->AddElement(firstElementRect, ID_FORMAT_BITMAP, *__pMsg, null, null); pItem->AddElement(secondElementRect, ID_FORMAT_STRING, L"Msg", true); __pList->SetItemEnabled(1,true); And it doesn't work. I'm using native app code.
Pushpa G
Hi lyssy, setitemenabled : it highlights/disables the entire list item, it does not check the check box
Kamil N
Hi Pushpa G, You're right (I miss this with setItemChecked)I should use: __pList->SetItemEnabled(1,false); - and it work's ok. So problem is only with setItemChecked Regards!
Pushpa G
:)its ok, thank you too:)