Update a Image

General TRichView support forum. Please post your questions here
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Update a Image

Post 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
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Post 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 ?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Post 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
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Post 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
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Post 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...
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Andy
Posts: 24
Joined: Wed Oct 15, 2008 6:06 am
Location: Switzerland

Post by Andy »

My current version (TSRichViewEdit) is 1.5.1

Where can I see / download the newest version

Andy
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply