trichview.com

trichview.support




Re: How to get a unique Item identifier?


Return to index


Author

Message

Sergey Tkachenko

Posted: 07/20/2002 20:14:54


Although it's possible to enumerate all items, including items in cells, I

think it is not needed.


I still do not understand what do you want. Item index (even if all items

are indexed) cannot be used as an identifier, because it is changed when you

add/delete items.


Can you give me more details?


>

> Hi Sergey,

>

> >rve := RichViewEdit1;

> >while rve.InplaceEditor<>nil do

> >  rve := TCustomRichViewEdit(rve.InplaceEditor);

>

> >But, in most of cases, CurItemNo is not needed. You can use GetCurrent***

> >and SetCurrent*** methods, which work with the item in position of caret

> -

> >both if it is in the main editor or in cell.

> You are right, but to realize my project the above method isn't a solution

> because CurItemNo always starts with "0" in each cell

> so it can't be used as a unique identifier :-(

> In OnCaretMove I want to check if another item is 'selected' (under the

caret)

> - if so some action is needed, if not (the caret is moved e.g. thru a long

> text) no action is needed ...

> So my question is: how to get a unique ItemNo doesn't matter where the

item

> is located (e.g. main document or in cell in table / in table / in table

> ..)? The Tag property can't be used because it's alredy in use.

> Do you have a solution or workaround for this?

>

> Thanks once more!

> Achim





Powered by ABC Amber Outlook Express Converter