ScaleRichView vs. RichViewEdit
Posted: Wed Dec 02, 2009 8:58 pm
Note: I am using ScaleRichView 3.0.
I want to take the contents of a ScaleRichView page and put it into RichViewEdit document. Once done, I want to display the final RichViewEdit document in the RichViewEdit part of the ScaleRichView control. What I am basically doing is taking several sub-documents with different headers and footers and merging them into a single document without specific headers and footers (they are now part of the text). In this manner I can then display the final merged document using ScaleRichView.
Here is the issue. When I unload and insert I always use streams. There are no errors on any of the unloads and inserts. Everything formats correctly. When I display the resulting merged page, I get a single blank line at the start of the text and then the remaining text is correct. When I try to edit the inserted Header text (which is now in the RichViewEdit portion of the ScaleRichView), the processing does not allow it. When I try to edit the remain text (orignial RichViewEdit), the processing does as expected. It appears the ScaleRichView control knows that the header text is header text regardless of how it is loaded.
How do I get this processing to work correctly?
The steps to recreate this are as follows:
1. Create 3 ScaleRichView instances.
2. In the first instance, create Header text and RichViewEdit text.
3. Using the second instance, unload the first Header and insert it in RichViewEdit. Once done, unload the first RichViewEdit and insert it in RichViewEdit.
4. Using the third instance, unload the second instance RichViewEdit and load it in the RichViewEdit, and then display it. At this point you should have an extra line at the top of the text (sometimes with some garbage in the very narrow beginning space). You should be able to edit the original RichViewEdit text but not the original Header text.
It should be noted that only the third instance is actually being displayed, the other two are internal formatting operations. You should also note that if the second instance is changed to TRichViewEdit (not in ScaleRichView), the same thing happens. It looks like there is some form of persistence being done for the Header (and possibly the Footer) text within ScaleRichView.
Any suggestions on what I am doing wrong?
Thanks,
I want to take the contents of a ScaleRichView page and put it into RichViewEdit document. Once done, I want to display the final RichViewEdit document in the RichViewEdit part of the ScaleRichView control. What I am basically doing is taking several sub-documents with different headers and footers and merging them into a single document without specific headers and footers (they are now part of the text). In this manner I can then display the final merged document using ScaleRichView.
Here is the issue. When I unload and insert I always use streams. There are no errors on any of the unloads and inserts. Everything formats correctly. When I display the resulting merged page, I get a single blank line at the start of the text and then the remaining text is correct. When I try to edit the inserted Header text (which is now in the RichViewEdit portion of the ScaleRichView), the processing does not allow it. When I try to edit the remain text (orignial RichViewEdit), the processing does as expected. It appears the ScaleRichView control knows that the header text is header text regardless of how it is loaded.
How do I get this processing to work correctly?
The steps to recreate this are as follows:
1. Create 3 ScaleRichView instances.
2. In the first instance, create Header text and RichViewEdit text.
3. Using the second instance, unload the first Header and insert it in RichViewEdit. Once done, unload the first RichViewEdit and insert it in RichViewEdit.
4. Using the third instance, unload the second instance RichViewEdit and load it in the RichViewEdit, and then display it. At this point you should have an extra line at the top of the text (sometimes with some garbage in the very narrow beginning space). You should be able to edit the original RichViewEdit text but not the original Header text.
It should be noted that only the third instance is actually being displayed, the other two are internal formatting operations. You should also note that if the second instance is changed to TRichViewEdit (not in ScaleRichView), the same thing happens. It looks like there is some form of persistence being done for the Header (and possibly the Footer) text within ScaleRichView.
Any suggestions on what I am doing wrong?
Thanks,