Page 1 of 1

How to set an item can not be deleted, but can edit the content inside

Posted: Sun Mar 10, 2019 2:31 am
by th9999
Hello administrator

Please tell me how to set an item. The label cannot be deleted in the document, but the content inside can be modified. How to set the TextStyle property,

Thank you very much!

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Sun Mar 10, 2019 9:55 am
by Sergey Tkachenko
The simplest solution would be inserting an edit control in TSRichViewEdit, preferably TSRVEdit.

If you want to implement it using a text item, assign the following properties of a text style for this item:
Protection: [rvprDeleteProtect, rvprStyleSplitProtect, rvprConcateProtect]
EmptyWidth: some nonzero value

Text style properties can still be deleted after setting them

Posted: Tue Mar 12, 2019 10:18 am
by th9999
Hello, administrator.

My project is just text, and I can't use TSRVEdit. I set the [rvprDeleteProtect, rvprStyleSplitProtect, rvprConcateProtect] attribute you said, and it can be deleted in the text. Is there any other way to change?

Example: I just want to get the text content underlined in red in the attached image.

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Tue Mar 12, 2019 5:23 pm
by Sergey Tkachenko
Probably, I do not understand your requirements.
rvprDeleteProtect must prevent the text item from deletion. But it does not protect from modifications, including character deletion. Normally, this option allows deletion of all characters except for the last character. But it EmptyWidth > 0, this option allows deleting all characters, but empty text item is not deleted.

Sorry, I do not understand the example with red underline.

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Wed Mar 13, 2019 12:12 am
by th9999
Thank you administrator. I'll try something else.

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Wed Mar 13, 2019 1:41 am
by th9999
Hi administrator, the version number of my directory SRichViewEdit is v5.9.6. Do you need to upgrade?

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Wed Mar 20, 2019 6:15 pm
by Sergey Tkachenko
You use very old version of ScaleRichView. Currently, the newest version is 8.5. So I highly recommend to upgrade.

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Sat Mar 23, 2019 12:12 am
by th9999
How do I upgrade now excuse me, should be buying again?

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Sat Mar 23, 2019 12:29 am
by th9999
I have purchased "TRichView+ScaleRichView", may I ask how to upgrade it now? thank you

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Sat Mar 23, 2019 9:29 am
by Sergey Tkachenko
I answered in a private message.

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Thu Mar 28, 2019 1:20 am
by th9999
Hello administrator,
I have updated the latest version I purchased, but I have set it as you said, I can still delete the rectification project, my code is as follows:

RVStyle1.TextStyles[11].EmptyWidth := 1;
RVStyle1.TextStyles[11].Protection := [rvprDeleteProtect, rvprStyleSplitProtect, rvprConcateProtect];

Re: How to set an item can not be deleted, but can edit the content inside

Posted: Thu Mar 28, 2019 6:41 am
by Sergey Tkachenko
Can you create a simple project reproducing this problem and send it by email?


PS: after reading your post in the private forum, I think that there is a possibility that you still compile the project using older version of ScaleRichView. I may be the reason of this problem.