1) I made a simple table in the sample editor and resized the columns to make the right column much shorter.
2) Then copied it and pasted in a Wordpad document and what I got was a smaller table with both columns of the same size.
3) Then, I pasted it in MS Word and it turned out ok.
4) Then, I copied this pasted table from Word and pasted in Wordpad and it turned out ok.
This shows some sort of RTF incompatibility between RichView Table RTF and that of Wordpad that uses msftedit.dll (latest RichEdit 4.1). Is this a known problem?
Thanks.
Table RTF and Wordpad
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Well, Wordpad has a very rudimentary table support.
There is a double definition of table size in RTF:
- something like a grid line to which table columns must be aligned
- HTML-like keywords for cell width.
Obviously, Wordpad does not understand the latter, especially if widths are defined in %.
Probably, after reexporting from MS Word, a grid line appeared more close to the real size.
There is a double definition of table size in RTF:
- something like a grid line to which table columns must be aligned
- HTML-like keywords for cell width.
Obviously, Wordpad does not understand the latter, especially if widths are defined in %.
Probably, after reexporting from MS Word, a grid line appeared more close to the real size.
Well, on more tests, it seems to be a RichEdit 4.1 bug. It changes cellx values.
The odd thing is that if I paste in a RichEdit 3, it doesn't change the cellx. But it can't really display the word wrapped tables well. So if I paste in RichEdit 3 and then take that RTF and paste in RichEdit 4.1, it works! So that might be a programmatic way to get the RTF translated to RichEdit 4.1. Quite kludgy, I agree.
BTW, how do you determine if the cell widths are set up by percentages in the ActionTest demo? Or, do I have to go at component level and see?
Thanks.
The odd thing is that if I paste in a RichEdit 3, it doesn't change the cellx. But it can't really display the word wrapped tables well. So if I paste in RichEdit 3 and then take that RTF and paste in RichEdit 4.1, it works! So that might be a programmatic way to get the RTF translated to RichEdit 4.1. Quite kludgy, I agree.
BTW, how do you determine if the cell widths are set up by percentages in the ActionTest demo? Or, do I have to go at component level and see?
Thanks.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I checked that, and it is not set to percentages. Anyway, I have a solution now. Before putting the RTF into richedit, I can note all the cellx values in a dynamic array. Then after pasting, I can get its RTF and replace the cellx values with the original ones. I have not had time to try this but I am sure it will work. I am waiting for my richview order to go through before I try this. Thanks.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: