Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 27-11-2006
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Poder: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Prueba a ver si te sirve esta rutina:

Código Delphi [-]
procedure ReplaceText(RichEdit: TRichEdit; const Text, ReplaceText: String);
var
  TextStart: Integer;
  TextLength: Integer;

begin
  TextStart := RichEdit.FindText(Text, 0, Length(RichEdit.Text), [stWholeWord]);
  TextLength := Length(Text);

  while TextStart <> -1 do
  begin
    RichEdit.SelStart := TextStart;
    RichEdit.SelLength := TextLength;
    RichEdit.SelText := ReplaceText;

    TextStart := RichEdit.FindText(Text, 0, Length(RichEdit.Text), [stWholeWord]);
  end;
end;

Ejemplo de uso:

Código Delphi [-]
ReplaceText(RichEdit1, 'nombre', n);

// Saludos
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Error al copiar texto Faust API de Windows 13 05-09-2006 06:45:41
Copiar texto en RichEdit darkerbyte Varios 4 16-11-2005 01:37:17
Copiar el texto de un RichEdit soul6301 Varios 5 11-11-2005 03:31:24
Copiar las columnas en un archivo de texto Paulina DelphiPACK 0 08-10-2004 18:54:07
Copiar texto de un RichEdit a otro SCH Varios 2 11-08-2003 08:16:26


La franja horaria es GMT +2. Ahora son las 07:02:46.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi