How to set an item can not be deleted, but can edit the content inside
How to set an item can not be deleted, but can edit the content inside
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!
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!
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to set an item can not be deleted, but can edit the content inside
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
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
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.
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.
- Attachments
-
- 截图.png (20.15 KiB) Viewed 92743 times
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to set an item can not be deleted, but can edit the content inside
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.
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
Thank you administrator. I'll try something else.
Re: How to set an item can not be deleted, but can edit the content inside
Hi administrator, the version number of my directory SRichViewEdit is v5.9.6. Do you need to upgrade?
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to set an item can not be deleted, but can edit the content inside
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
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
I have purchased "TRichView+ScaleRichView", may I ask how to upgrade it now? thank you
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to set an item can not be deleted, but can edit the content inside
I answered in a private message.
Re: How to set an item can not be deleted, but can edit the content inside
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];
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];
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to set an item can not be deleted, but can edit the content inside
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.
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.