Ver Mensaje Individual
  #8  
Antiguo 12-09-2006
Avatar de Alexander
Alexander Alexander is offline
Miembro
 
Registrado: may 2004
Posts: 235
Reputación: 23
Alexander Va por buen camino
He logrado esto

Haciendo pruebas helogrado hacer lo siguiente:

Paso el texto a un RichEdit y en este si se puede resaltar la palabra, así:

Código Delphi [-]
  procedure ResaltaPalabraEnRE(RichEdit:TRichEdit;Palabra:string);
     var
       Texto    : string;
       Posicion : integer;
     begin
       texto := RichEdit.Lines.Text;
       repeat
         Posicion:=ansipos(palabra,texto);
         Richedit.SelStart:=Posicion-1;
         Richedit.SelLength:=Length(Palabra);
         Richedit.SelAttributes.Color:=clred;
         texto[Posicion+1]:=Chr(255);
         Posicion:=ansipos(palabra,texto);
       until (Posicion=0);
     end;

Como podré hacer esto mismo pero con un DBRichEdit o con DBGrid.

Gracias

Alexander
__________________
Cielos azules
Responder Con Cita