trichview.com

trichview.support




Re: Getting the text of an item using TCustomRVItemInfo


Return to index


Author

Message

Martin Holmes

Posted: 07/05/2004 15:18:57


Reading the source, I've discovered there are several apparent ways to

get the style number:


       TCustomRVItemInfo(AllItems[i]).StyleNo


       TCustomRVItemInfo(AllItems[i]).AssociatedTextStyleNo


       TCustomRVItemInfo(AllItems[i]).GetActualStyleNo


Which of these is most reliable when I'm trying to get the style of the

item? Would they return different values under any circumstances?


I'm still struggling to find a way to get the text. Perhaps I could

explain what I'm actually trying to do here. What I'm creating is a

footnote system, basically, and every time a footnote is inserted, I

need to find the number of the previous footnote so that I can determine

the appropriate number for the new one, and renumber any subsequent

ones. If there's a better way to do this, I'll be very glad to have it

pointed out to me, but at the moment all I can think of is to build an

index of items and move up and down the list, to find which ones have

the footnote style, then read or change their text (= footnote number).

I could store the footnote number in the tag for each item, but I'd

still have to display it in the text, and I'd still have to change it

for all subsequent footnotes, so I still have to be able to write the

text of the item.


All help appreciated,

Martin


Martin Holmes wrote:

> So is there any way I can get at the text if I have a pointer to the

> item? Does the item have any properties I could use to get at its text?

>

> Cheers,

> Martin

>

> Sergey Tkachenko wrote:

>

>> Item does not store its text (may be this will be changed in future).

>> Text is stored separately.

>>

>>

>>

>>> Hi there,

>>>

>>> I've written functions which create for me a list of all the items in a

>>> document in TRichViewEdit (including embedded tables) in sequence, so I

>>> can iterate through them in order. I'm accessing the resulting items

>>> like this:

>>

>>

>>

>>





Powered by ABC Amber Outlook Express Converter