Page 1 of 1

How to delete an entire field partially highlighted?

Posted: Fri Nov 24, 2006 5:43 am
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

Posted: Fri Nov 24, 2006 8:40 pm
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.