Ver Mensaje Individual
  #3  
Antiguo 27-07-2012
Gerson12 Gerson12 is offline
Miembro
NULL
 
Registrado: abr 2012
Ubicación: Peru-Lima
Posts: 138
Reputación: 15
Gerson12 Va por buen camino
Cita:
Empezado por roman Ver Mensaje
No estoy seguro de entender pero vamos a ver. Si quieres buscar lo que está en el edit dentro del memo, sólo tendrías que poner:

Código Delphi [-]
Start := Pos(Edit.Text, Memo.Text);
if Start > 0 then
begin
  Memo.SelStart := Start;
  Memo.SelLength := Length(Edit.Text);
end;

Pero si quieres buscar el texto del edit pero sólo si está con el texto predeterminado, puedes concatenar dicho texto al momento de buscar:


Código Delphi [-]
Start := Pos('file:' + Edit.Text + '.exe', Memo.Text);
if Start > 0 then
begin
  Memo.SelStart := Start + Length('file:');
  Memo.SelLength := Length(Edit.Text);
end;

// Saludos
gracias por la respuesta lo provare pero antes disculpame pero otra pregunta
como haria para agregar a otro memo el texto seleccionado por la busqueda
Responder Con Cita