trichview.com

trichview.support




Moving cursor with code and find replace with begin..end text


Return to index


Author

Message

zekeriye

Posted: 02/20/2003 11:46:38


Hi;

  I am very sorry for my bad english, firstly.

  I am search a component for writing app. I am use it with delphi5. Richview

is very nice and usefull for my app.


  I download the demo richview and  richviewactions. Modify the actions program

for testing and searching my program.


  My Program is search text in document and replace them an other text which

is contain data and view the document with data for user changing.

  In this case I have got two problems.

  1 - I can't move the cursor top of the document (fisrt line, first char)

with code.

  2 - I want to select text wich is begin '{' char and ending '}' char. Between

two char '{....}' I don't know which text contain. So I need to '{' and '}'

position in document and selecting between them with. I didn't find in richviewedit's

method. The method is containing by richedit. Example delphi code ;


   xfistpos:=Richedit1.Findtext('{',0,length(richedit1.lines.text),[]); //

first { char pos

   xsecpos:=Richedit1.Findtext('}',0,length(richedit1.lines.text),[]);  //

first } char pos

   richedit1.selstart:=xfirstpos;

   richedit1.sellength:=(xsecpos-xfirstpos)+1;

//   the selected text like {SOMETEXT}  and replacing by program

//   like this CONTAINING SOME DATABASE AND THEN

//  and


   Can You help me?


   Thanks,


   Zekeriye Bozkurt





Powered by ABC Amber Outlook Express Converter