语言

Menu
Sites
Language
groupedlistview

Hi, tell me please how to use function closecontexitem and opencontextitem. Give me please example. Thanx.

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

1 回复
Alex Dem
Hi, These methods are to show/close context of specified item in your GroupList. The context is shown when specified list item was swept also. 1)You could set context for every Item this way: __pItemContext = new ListContextItem(); __pItemContext->Construct(); __pItemContext->AddElement(ID_CONTEXT_ITEM_1, "Test1",true); __pItemContext->AddElement(ID_CONTEXT_ITEM_2, "Test2",true); and set context of specified item after: pItem->SetContextItem(__pItemContext); elements of context could be handled inside OnGroupedListViewContextItemStateChanged 2) You could create button outside of GroupList and add for this button inside OnActionPerformed code: if(__pGroupedListView->IsContextItemOpened(groupIndex,itemIndex)==false) { __pGroupedListView->OpenContextItem(groupIndex,itemIndex); } else { __pGroupedListView->CloseContextItem(groupIndex,itemIndex); } break; Here groupIndex, itemIndex are indexes to determine specified item. Provided code will open open/close context of specified item on button press. Alexey.