Board index » delphi » RichEdit : deleting unprotected text between two protected texts

RichEdit : deleting unprotected text between two protected texts

Hi,

I have, in a RichEdit, unprotected texte between two protected text (say
"PPPPPPUUUUUQQQQQQ")

If I delete (with the keyboard) the unprotected text  (all "U" characters),
the two protected areas look to merge, and this prevent me to re-insert
anything between the two protected text (before the first "Q").

Is it a feature of RichEdit, or does anybody knows a way to allow insertion
again ?

As a workaround, I already managed to let one blank caracter between the two
protected area, but it is not really clean, and Iwould like to find better.

Thanks for help.

 

Re:RichEdit : deleting unprotected text between two protected texts


In article <3e563e8...@newsgroups.borland.com>, "Tintin" <cont...@mrit.qom>
wrote:

Quote
> Is it a feature of RichEdit

It seems normal.
After all if P and Q were Bold and U plain, and you deleted all the U's,
anything you next inserted between the P and Q would be bold, wouldn't it, -
whether in TRichedit, Word, or anything else. Why would you expect some
other attribute to work differently,

Re:RichEdit : deleting unprotected text between two protected texts


Quote
In article <3e563e8...@newsgroups.borland.com>, Tintin wrote:
> Is it a feature of RichEdit, or does anybody knows a way to allow insertion
> again ?

How about unprotecting the text, doing your insertion followed by
re-protecting the two areas?

Mike Orriss (TeamB and DevExpress)

Re:RichEdit : deleting unprotected text between two protected texts


Hi !

I'm not sure to understand your idea.

If I unprotect the whole text to allow insertion, the user will be able to
remove the PPPP and QQQQ parts which shouldn't be changed...

"Mike Orriss (TeamB)" <m...@3kcc.co.uk> a crit dans le message
<news:VA.00002c1d.01123132@pcmike1>...

Quote
> In article <3e563e8...@newsgroups.borland.com>, Tintin wrote:
> > Is it a feature of RichEdit, or does anybody knows a way to allow

insertion

Quote
> > again ?

"Mike Orriss (TeamB)" <m...@3kcc.co.uk> a crit dans le message news:
VA.00002c1d.01123132@pcmike1...
Quote
> In article <3e563e8...@newsgroups.borland.com>, Tintin wrote:
> > Is it a feature of RichEdit, or does anybody knows a way to allow
insertion
> > again ?

> How about unprotecting the text, doing your insertion followed by
> re-protecting the two areas?

> Mike Orriss (TeamB and DevExpress)

Re:RichEdit : deleting unprotected text between two protected texts


Quote
In article <3e5b9...@newsgroups.borland.com>, Tintin wrote:
> If I unprotect the whole text to allow insertion, the user will be able to
> remove the PPPP and QQQQ parts which shouldn't be changed...

I was suggesting a temporary unprotection while you execute the procedure.
While this is in progress you can disable the form thus preventing user
input.

Mike Orriss (TeamB and DevExpress)

Other Threads