Solved

Not Found UNDO in my RichEdit with Syntax Highlighting

Posted on 2003-10-21
2
171 Views
Last Modified: 2013-11-22
I have created a descending class of TRichEdit for the syntax highlighting. the code of the main procedure is Procedure SyntaxHihglighting; the procedure analyzes a line and it transforms it into format RTF.  

class TRichEditPHP = (TRichEdit)
private
   ...
   OutStream : TMemoryStream;
   Procedure SyntaxHighlighting;
protected
    procedure Change; override;
public
   ...
published
   ...
end;
   
Procedure TRichEditPHP.SyntaxHighlighting;  
var  
      ...  
begin  
      OutStream := TMemoryStream.create;  
      ...  
      ...  
      / / end analysis lines, we take it to the exit  
      OutStream.Position := 0;  
      lines.strings[fila-1] := ConvertStreamString(OutStream);  
      OutStream.Free;  
      ...  
End;  
 
This procedure places it in the event Change.  
 
procedure TRichEditPHP.Change;  
begin  
  if HandleAllocated then  
  begin  
    if not ActivaConversion then  
    begin  
      UpdateCursorPos;  
      SyntaxHighlighting;  
    end;  
  end;  
  inherited;  
end;  
 
My Problem is when I use my class in a program the procedure UNDO it doesn't work it is disabled while I go writing text in the TRichEditPHP1.  
As I can solve it, another alternative exists to UNDO creating another procedure.
Please, downloading my Demo Program whith source code: http://www.malpicasoft.com/english/demo/DemoEnglish.zip
0
Comment
Question by:bfgnet
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 250 total points
ID: 9590821
seems you have to write your own undo-algorythm

i guess it is disabled, because the changes are done programatical
during each change, which cannot logged by th inbuild undo

meikl ;-)
0
 

Author Comment

by:bfgnet
ID: 9590953
Thank you very much, Kretzschmar.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Printing problem 2 80
How to build JSON File in Delphi 6 3 13
Graphics32 under Delphi 10.1 Berlin 2 38
Multi-layered image in FireMonkey 9 17
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 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

12 Experts available now in Live!

Get 1:1 Help Now