Page 1 of 1

How to setItemText for an Item

Posted: Tue Feb 28, 2017 10:05 am
by cychia_n2n
I have a list to keep Text Items with special tag i have assigned to when calling AddNLTag. When I need to update the Item text, i will loop through my list and update item text one follow by another.

I tried, rve.SetItemText(rve.GetItemNo(TextItem), 'updated text'), but items in table cell does not seems to be working.

What is the best way to update Item's Text?

Thanks.

Re: How to setItemText for an Item

Posted: Tue Feb 28, 2017 11:07 am
by Sergey Tkachenko
Items in table cells cannot be accessed as rve.GetItem(). They belong to items of a cell, not of the root document.
You need to store two values: ItemNo and RVData.
For the root document, RVData = rve.RVData
For cell, RVData = Cell.

Code for changing cell:
RVData.GetRVData.SetItemText(ItemNo, 'updated text');