Solved

Not Found UNDO in my RichEdit with Syntax Highlighting

Posted on 2003-10-21
2
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 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