Page 1 of 1

Protection of text and pictures.

Posted: Thu Sep 19, 2013 2:32 pm
by Marcer
Hi,

I have a function that protect all the text in my RichView by assigning [rvprModifyProtect, rvprDeleteProtect, rvprSticking, rvprStickToTop] to every style in my RichView. Also, when my function detects a picture with « StyleNo = rvsPicture », I apply the following code :

Code: Select all

SetItemExtraIntProperty(iItm, rvepDeleteProtect, 1);
SetItemExtraIntProperty(iItm, rvepResizable, 0);
My problem is that I can insert text between my text and my picture.

Is there a way to prevent this behavior.

Thank you.

Posted: Thu Sep 19, 2013 2:38 pm
by Sergey Tkachenko
The simplest way to protect everything is assigning RichViewEdit.ReadOnly := True.

Also, you can protect paragraph (see Options property of paragraph style).

Or, to prevent inserting something between specific items, you can use OnCheckStickingItems event.

Posted: Fri Sep 20, 2013 2:18 pm
by Marcer
Hello Sergey,

I'm currently implementing a functionality to protect the current selection. So « RichViewEdit.ReadOnly := True » and « paragraph style » are not solutions that I can consider.

On the other hand, OnCheckStickingItems is pretty much what I needed but there is a catch.

When I have two paragraph separated by a picture protected with rvprSticking and rvepDeleteProtect, OnCheckStickingItems is not fired when I write to the left or to the right of my picture, probably because of line feeds.

Do you have any recommendations to correct this problem?

Posted: Sat Sep 21, 2013 8:10 am
by Sergey Tkachenko
It's a bug. It will be fixed in the next update.

Posted: Tue Sep 24, 2013 7:40 pm
by Sergey Tkachenko
Fixed in v14.9.1 (available for registered users)