语言

Menu
Sites
Language
can we change list Items style after creatation of list

Hi,

can we change the style of list from LIST_ANNEX_STYLE_NORMAL to LIST_ANNEX_STYLE_RADIO. After creation of list.

When we click on edit button(any other button in my form) can we change list item style to LIST_ANNEX_STYLE_RADIO.

So that I can select more items and delete.

Thanks

Rajyalakshmi

响应

3 回复
hgw7

As ListAnnexStyle is to be given in the Construct method itself, it might not be possible to change the style after it is created. You will have to construct the list again with Radio style.

Alex Dem

Hi,
I think it is possible to change style of all items in list this way:
1)At first you could add into your class memeber:
Tizen::Ui::Controls::ListAnnexStyle __itemsStyle;
and initialize it with LIST_ANNEX_STYLE_NORMAL (for example).

2)After this you could modify virtual method 'CreateItem' of IListViewItemProvider for all items this way:
    case 0:
    case 1:
        {
            pItem->Construct(Dimension(itemWidth,200), __itemsStyle);
        }
                               
3)You could update your list this way inside OnActionPerformed():
__itemsStyle = LIST_ANNEX_STYLE_RADIO;
__pListView->UpdateList();

All items will be recreated with same params but with changed style.
FYI if you want to update style of single item you could use RefreshList(itemIndex,LIST_REFRESH_TYPE_ITEM_MODIFY);
Alexey.

y Rajyalakshmi

Hi Alex Dem,

Thanks for the response it is working fine.

Thanks

Rajyalakshmi