Hi,
I am observing that when a table is added to a TRichView document, or pasted from Word, the dimensions are set to Width: auto by default.
If the document is saved in RTF format, the tables are off the sheet. It is as if you did not take into account the right margin of the document. This is solved if the width is set manually (or just put Width: percent 100%).
The question is ... can you set the tables to be 100% wide by default? How could we do the same for tables that are pasted from Word?
Thank you.
PD: I used TRichView and TScaleRichView in latest versions.
Tables Width RTF error
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Tables Width RTF error
You can process OnItemAction event:
But I do not think that this is a good idea.
Code: Select all
procedure TForm3.RichViewEdit1ItemAction(Sender: TCustomRichView;
ItemAction: TRVItemAction; Item: TCustomRVItemInfo;
var Text: TRVUnicodeString; RVData: TCustomRVData);
begin
if (ItemAction = rviaInserted) and (Item is TRVTableItemInfo) and
(TRVTableItemInfo(Item).BestWidth = 0) then
TRVTableItemInfo(Item).BestWidth := -100;
end;