procedure TForm1.CHARGE_MEMO1_CFG(Sender: TObject; nomFicCFG: string); var CfgFile: TIniFile; TempList: TStringList; //liste temporaire begin CfgFile := TIniFile.Create(nomFicCFG); with Form1 do begin MEMO1.Clear; TempList : = TStringList.Create; try CfgFile.ReadSection('IDENT', TempList); Memo1.Lines.AddStrings(TempList); CfgFile.ReadSectionValues('IDENT', TempList); Memo1.Lines.AddStrings(TempList); CfgFile.ReadSection('PERSO', TempList); Memo1.Lines.AddStrings(TempList); CfgFile.ReadSectionValues('PERSO', TempList); Memo1.Lines.AddStrings(TempList); finally TempList.Free; end; end; CfgFile.Free; end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question