Ver Mensaje Individual
  #2  
Antiguo 27-07-2012
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
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
Responder Con Cita