Solved

Not Found UNDO in my RichEdit with Syntax Highlighting

Posted on 2003-10-21
2
190 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

729 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