Hi,
i have a little problem with TRichViewEdit.
I add short strings with AddText;
Example:
rv.AddText('hel', 0);
rv.AddText('lo wor', 0);
rv.AddText('ld', 0);
In the RichView "rv" shown the text "hello world", thats great!
When i dubleclick the text then marks the component only the words,
"hel"
"lo"
"wor"
"ld"
What is the mistake on my side?
I don't select the words "hello" and "World" as one complete.
best wishes, Frank
How can use AddText right?
-
- Posts: 14
- Joined: Fri Jan 20, 2006 11:05 am
- Location: Germany
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Currently, it's a designed behavior.
Double clicking can select text only inside one item, but you add 3 different items.
Add*** methods (unlike editing methods, i.e. InsertText) do not combine adjacent items of the same style in one item.
You can call NormalizeRichView (from RVNormalize.pas of RichViewActions) after the document generation. Among other things, this procedure will assemble one item from these 3 items.
Double clicking can select text only inside one item, but you add 3 different items.
Add*** methods (unlike editing methods, i.e. InsertText) do not combine adjacent items of the same style in one item.
You can call NormalizeRichView (from RVNormalize.pas of RichViewActions) after the document generation. Among other things, this procedure will assemble one item from these 3 items.