change text in an item
Posted: Tue Nov 11, 2008 4:01 pm
Hi, Sergey.
I want to change a text fragment from an text item.
For example in an item I have text: "It's a wonderles world" with charset, let's say, 200. I want to change the word "wonderles" with "wonderful" (same length) but with charset, let's say, 250. So I will obtain 3 items: "It's a " and " world" with charset 200 and "wonderful" with charset 250.
Question is: how can I do this so it executes as fast as possible (I make a lot of changes to large texts)? And in both situations: with or without Undo.
I was thinking of using the text fragment ("wonderful") to make a rtf as string, convert it to a stream and then insert it over the old selected text ("wonderles") with InsertRTFFromStreamEd; but it's too slow (especially in table cells where I have to enter in edit mode even if I don't need Undo).
Thank you in advance for any idea.
Best regards.
I want to change a text fragment from an text item.
For example in an item I have text: "It's a wonderles world" with charset, let's say, 200. I want to change the word "wonderles" with "wonderful" (same length) but with charset, let's say, 250. So I will obtain 3 items: "It's a " and " world" with charset 200 and "wonderful" with charset 250.
Question is: how can I do this so it executes as fast as possible (I make a lot of changes to large texts)? And in both situations: with or without Undo.
I was thinking of using the text fragment ("wonderful") to make a rtf as string, convert it to a stream and then insert it over the old selected text ("wonderles") with InsertRTFFromStreamEd; but it's too slow (especially in table cells where I have to enter in edit mode even if I don't need Undo).
Thank you in advance for any idea.
Best regards.