TLama

Untitled

May 3rd, 2013
397
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. uses
  2.   IniFiles;
  3.  
  4. procedure TForm1.Button1Click(Sender: TObject);
  5. var
  6.   I: Integer;
  7.   AppIni: TMemIniFile;
  8. begin
  9.   AppIni := TMemIniFile.Create(ExtractFilePath(Application.ExeName) + 'Test.ini', TEncoding.UTF8);
  10.   try
  11.     for I := StringGrid1.FixedRows to StringGrid1.RowCount - 1 do
  12.     begin
  13.       StringGrid1.Cells[0, I] := AppIni.ReadString('Column1', 'Row' + IntToStr(I), '');
  14.       StringGrid1.Cells[1, I] := AppIni.ReadString('Column2', 'Row' + IntToStr(I), '');
  15.     end;
  16.   finally
  17.     AppIni.Free;
  18.   end;
  19. end;
RAW Paste Data