Page 1 of 2

Update a Image

Posted: Wed Oct 15, 2008 12:00 pm
by Andy
What is the right way to replace a Image for TRVGraphicItemInfo-Object.

Now I use Image.LoadFile(fName) and after RichViewEdit.Reformat.

But I think it's too much for a simply update.
And as second I would like prevent a automatic resize of the Image.

Please tell what is the fastest way without flicker.

Andy

Posted: Wed Oct 15, 2008 2:32 pm
by Andy
Another problem is PageBreak before a Table .
Always is a empty line before the table.
If I delete this line, the Table is on the page before !

Have you a quick Bugfix for this sergey ?

Thanks

Andy

Posted: Wed Oct 15, 2008 2:37 pm
by Sergey Tkachenko
I do not recommend using undocumented methods and objects when it is not absolutely necessary. Do not use TRVGraphicItemInfo object directly.
1) For changing picture as an editing operation (that can be undone) use SetPictureInfoEd or SetCurrentPictureInfo.
2) For changing picture not as an editing operation use SetPictureInfo and then Reformat.

Posted: Wed Oct 15, 2008 2:40 pm
by Sergey Tkachenko
Sorry, I do not understand the question about a page break in before a table.
A "page break before" flag can be assigned to a table like to any other item.
And "page break before" for the first item in the document is ignored, because each page must have at least one item on it.

Posted: Wed Oct 15, 2008 3:43 pm
by Andy
Sorry for PageBreak but in this case I understand you not.

How and where can I set this flag for break before or break after ?
In the moment I use in my allpication the action "TrvActionInsertPageBreak"

I'm happy when I can do this in detail, but I need a example for this.

Andy

Posted: Wed Oct 15, 2008 3:50 pm
by Sergey Tkachenko
This action just calls RichViewEdit.InsertPageBreak method. This method does the following:
- if the caret not at the beginning of paragraph, it adds a line break;
- sets "page break before" flag for the item at the position of the caret.

If the caret is to the left of the table, this action simply sets "page break before" flag for this table, and the table is printed from a new page. But if this table is the first item in the document, this flag is ignored.

Posted: Wed Oct 15, 2008 4:20 pm
by Andy
If the caret is on the left side the Table, nothing happens by RichViewEdit.InsertPageBreak method.

If the caret is above the table, the table is after on the new page but with a empty line above the Table.
If I delete this line, the Table is on the page before again.

Where can be the mistake ?

Posted: Wed Oct 15, 2008 6:12 pm
by Sergey Tkachenko
If the caret is on the left side the Table, nothing happens by RichViewEdit.InsertPageBreak method.
Sorry, I cannot reproduce this problem. I just tried ActionTest demo compiled with TRichView 10.0 and with the latest version available for registered users.
In both cases, when I insert a table somewhere in text, move the caret to the left of the table, then call "Insert Page Break" action, it inserts a page break before the table, as expected.

Posted: Wed Oct 15, 2008 8:00 pm
by Andy
Please Sergey, mail me a example document (rvf) where on the second page is a table absoltly on the top, without a empty line.

I can not believe that only I have this problem, because I can't control it.


Thanks

Andy

Posted: Thu Oct 16, 2008 5:43 am
by Andy
Hi Sergey,

Maybe it's a problem in my version.
Can you mail me, the responsibly unit for insert Page break ?

by the way: Is it possibly to attach a image in this forum ?


Andy

Posted: Thu Oct 16, 2008 6:32 am
by Andy
I have test with the original "RichViewActions-Test" and here is the same problem.
a Table can not stay on very first position on a new page.
All other items no problem.
I can not solve the problem by my code.
Please help...

Posted: Thu Oct 16, 2008 7:42 am
by Andy
Next stage:

Now I activae option for draw rvoShowPageBreaks
And indeed, the pagebreak line will draw before table.
But it has no affect in case of table.

Posted: Thu Oct 16, 2008 10:25 am
by Sergey Tkachenko
What is your version of TRichView?
If it is old, please update to the latest version.

An image cannot be posted in this forum. You can only place it on some other web server and insert it in a message using Image code.

Posted: Thu Oct 16, 2008 10:46 am
by Andy
My current version (TSRichViewEdit) is 1.5.1

Where can I see / download the newest version

Andy

Posted: Thu Oct 16, 2008 10:53 am
by Sergey Tkachenko
Sorry, I thought that the problem was in TRichViewEdit.
It looks like ScaleRichView actually has this problem. It will be fixed ASAP.