View Issue Details

IDProjectCategoryView StatusLast Update
0002217JEDI VCL00 JVCL Componentspublic2004-10-12 14:40
ReporteranonymousAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.00 RC 1 
Summary0002217: JvFindReplace doesn't start ReplaceAll operation form caret position
DescriptionIt's usual to start a ReplaceAll option from the current caret position. JvFindReplace ignores the caret position.

In ReplaceAll, replace
  FoundPos := FindInText(Txt, SearchText, 0, TLen, True);
with
  FoundPos := FindInText(Txt, SearchText, EditControl.SelStart + EditControl.SelLength, TLen, True);

Additional Informationprocedure TForm1.Button1Click(Sender: TObject);
var
  JvFindReplace: TJvFindReplace;
begin
  Edit1.SetFocus;
  Edit1.Text := ' me abc me ';
  Edit1.SelStart := 5;
  Edit1.SelLength := 1;
  JvFindReplace := TJvFindReplace.Create(self);
  try
    JvFindReplace.EditControl := Edit1;
    JvFindReplace.ShowDialogs := false;
    JvFindReplace.ReplaceAll('me','z');
  finally
    JvFindReplace.Free;
  end;
end;
TagsNo tags attached.

Activities

user72

2004-10-12 14:40

  ~0005366

Fixed in CVS

Issue History

Date Modified Username Field Change
2004-10-12 13:41 anonymous New Issue
2004-10-12 14:40 user72 Status new => resolved
2004-10-12 14:40 user72 Resolution open => fixed
2004-10-12 14:40 user72 Assigned To => user72
2004-10-12 14:40 user72 Note Added: 0005366