anchor.diff:      dlg.Free;
     end;
     inherited InternalButtonClick(Sender);
  +  if old <> FEdit.Text then
  +    DoFilenameSet(old, FEdit.Text);
   end;
   
   
  
positive.code: procedure TfpgFileNameEdit.InternalButtonClick(Sender: TObject);
  var
    dlg: TfpgFileDialog;
  begin
    dlg := TfpgFileDialog.Create(nil);
    try
      if FileName = '' then
  
negative.code:   Result := FEdit.Text;
  end;
  
  procedure TfpgFileNameEdit.DoFilenameSet(const AOld, ANew: TfpgString);
  begin
    if Assigned(FOnFilenameSet) then
      FOnFilenameSet(self, AOld, ANew);
  end;
  
  procedure TfpgFileNameEdit.HandlePaint;
  var
    img: TfpgImage;
  