Solved

TRichEdit question

Posted on 2000-02-24
8
245 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
Comment Utility
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
Comment Utility
RichEdit1.selAttributes.Protected:=False;
doesn't work - where is the mistake?
0
 

Author Comment

by:Masonok
Comment Utility
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
 

Author Comment

by:Masonok
Comment Utility
Adjusted points to 60
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:Masonok
Comment Utility
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
Comment Utility
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
Comment Utility
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 60 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now