Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TRichEdit question

Posted on 2000-02-24
8
Medium Priority
?
256 Views
Last Modified: 2010-04-04
I drag&drop this text from Outlook mail window and after that I cannot delete or edit this text (but I can insert&edit text after & before this "special" fragment). If I drag this text in MS-Word and from MS-Word drag into my program I can operate with this text normally! How can I solve this problem?

0
Comment
Question by:Masonok
  • 5
  • 3
8 Comments
 
LVL 10

Expert Comment

by:Lischke
ID: 2554064
Try to exclude caProtected from the newly inserted text (TextAttributes). It looks as if it would be protected text. Alternatively, you can assign an OnProtectChange event handler.

Ciao, Mike
0
 

Author Comment

by:Masonok
ID: 2554103
RichEdit1.selAttributes.Protected:=False;
doesn't work - where is the mistake?
0
 

Author Comment

by:Masonok
ID: 2554108
I tried to make text protected (True) and it became absolutely as "special" text. But when I tried to put Protection to False position "special" text remaines protected!
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Masonok
ID: 2554124
Adjusted points to 60
0
 

Author Comment

by:Masonok
ID: 2554125
You ARE THE MAN!! If I make "AllowChange:=True"  it works!!!
That is GREAT!

Please tell me: Is there a possibility to remove protection from the text? and 60 points (instead of 50) will be yours!
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2554156
Setting the protection property to False should work (caProtected was of course wrong as this flag is used in the consistent text attributes, but you still got it :-)). Are you sure you are modifying the correct selection?

Ciao, Mike
0
 

Author Comment

by:Masonok
ID: 2554171
Absolutely! I just type "fffffffffffff" on the new line, select this text and set Protected to "True" then select this text and tried to set to "false" and then tried to change it - nothing happend!

0
 
LVL 10

Accepted Solution

by:
Lischke earned 240 total points
ID: 2554219
Yeah, I found the problem. It's the fact that the rich edit calls back about the protection change. This happens exactly as when you try to change protected text. This means you still need OnProtectChange. The strange thing is that you cannot set a text to protected again if you always return AllowChange = True. It is in fact so that (if you have the event handler attached) text can be set to be protected if you return False (in AllowChange) or can be edited if you return True (but not set to protected state).

Ciao, Mike
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Integration Management Part 2
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question