How to delete an entire field partially highlighted?

General TRichView support forum. Please post your questions here
Post Reply
alogrep
Posts: 52
Joined: Fri Oct 27, 2006 5:25 pm

How to delete an entire field partially highlighted?

Post by alogrep »

HI
I have a form where users can insert fields with InsertStringTag.
Now, if the user highlights part of it (with the mouse) for deletion,
I want to make sure the ENTIRE field is deleted. Any easy way?
Thanks
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, no.
Yes, it's possible process OnKeyDown and adjust the selection if the user presses Delete on Backspace and fields are partially selected, but:
- if fields are not protected, users still will be able to modify its text;
- selection can be deleted by pressing many other keys.

May be you can simple protect it from modification? Include rvprModifyProtect in the Protection property of its text style. After that, it will be able to delete fields only if they are selected completely.
Post Reply