Hi.
I uses trichviewEdit v1.9.38 for delphi 7.
When a Page break is working..and the table exists..
the undo doesn't work well.
Please help me.
Undo Problem
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 20
- Joined: Fri Sep 01, 2006 4:20 am
- Location: seoul korea
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
When caret is inside table, you can call code to split this table in two parts and insert page break between: http://www.trichview.com/forums/viewtopic.php?t=586
Otherwise, this command must be disabled when the caret is inside table cell (when RichViewEdit.InplaceEditor<>nil)
Otherwise, this command must be disabled when the caret is inside table cell (when RichViewEdit.InplaceEditor<>nil)
-
- Posts: 20
- Joined: Fri Sep 01, 2006 4:20 am
- Location: seoul korea
I found my Edit's bug.
I uses RVPrint.OnFormatting event to change the table when the edit is
printed.
----------------------------------------------------------------------------------
procedure TfEditorMain.RVPrint1Formatting(Sender: TCustomRichView;
PageCompleted: Integer; Step: TRVPrintingStep);
var
i: integer;
table : TRVTableItemInfo;
begin
if step = rvpsStarting then
begin
for i := 0 to RichViewEdit1.RVData.Items.Count - 1 do
if RichViewEdit1.RVData.GetItemStyle(i) = rvsTable then
begin
table := TRVTableItemInfo(RichViewEdit1.RVData.GetItem(i));
table.CellVSpacing := 0;
table.CellHSpacing := 0;
table.bestwidth := table.width-42;
table.OnDrawBorder := DoDrawBorder;
end;
end
else if step = rvpsFinished then
begin
for i := 0 to RichViewEdit1.RVData.Items.Count - 1 do
if RichViewEdit1.RVData.GetItemStyle(i) = rvsTable then
begin
table := TRVTableItemInfo(RichViewEdit1.RVData.GetItem(i));
table.CellVSpacing := -1;
table.CellHSpacing := -1;
table.bestwidth := table.width;
table.OnDrawBorder := DoDrawBorder;
table.Changed;
end;
end;
end;
------------------------------------------------------------------------------
If page break is working and the above event is also working then
the undo event works abnormally.(If Table exists)
So... I will use above event exactly when I printing.
However ..If page break is working ..and below code is in button
click event.. and click event is accured..
---------------
RichViewEdit1.InsertRVFFromStreamEd(s);
---------------
then.. the undo event works but exception accured.
Please answer how to use 'undo' fuction..
When I uses page break and InsertRVFFromStreamEd at the same time.
I uses RVPrint.OnFormatting event to change the table when the edit is
printed.
----------------------------------------------------------------------------------
procedure TfEditorMain.RVPrint1Formatting(Sender: TCustomRichView;
PageCompleted: Integer; Step: TRVPrintingStep);
var
i: integer;
table : TRVTableItemInfo;
begin
if step = rvpsStarting then
begin
for i := 0 to RichViewEdit1.RVData.Items.Count - 1 do
if RichViewEdit1.RVData.GetItemStyle(i) = rvsTable then
begin
table := TRVTableItemInfo(RichViewEdit1.RVData.GetItem(i));
table.CellVSpacing := 0;
table.CellHSpacing := 0;
table.bestwidth := table.width-42;
table.OnDrawBorder := DoDrawBorder;
end;
end
else if step = rvpsFinished then
begin
for i := 0 to RichViewEdit1.RVData.Items.Count - 1 do
if RichViewEdit1.RVData.GetItemStyle(i) = rvsTable then
begin
table := TRVTableItemInfo(RichViewEdit1.RVData.GetItem(i));
table.CellVSpacing := -1;
table.CellHSpacing := -1;
table.bestwidth := table.width;
table.OnDrawBorder := DoDrawBorder;
table.Changed;
end;
end;
end;
------------------------------------------------------------------------------
If page break is working and the above event is also working then
the undo event works abnormally.(If Table exists)
So... I will use above event exactly when I printing.
However ..If page break is working ..and below code is in button
click event.. and click event is accured..
---------------
RichViewEdit1.InsertRVFFromStreamEd(s);
---------------
then.. the undo event works but exception accured.
Please answer how to use 'undo' fuction..
When I uses page break and InsertRVFFromStreamEd at the same time.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: