PRec=^TRec;

TRec=record

a:Integer;

b:string;

end;

 

AddItem:

var rec:PRec;

begin

new(rec);

rec.a:=1;

rec.b:=’a’;

lst.Items.AddObject(‘It’s Demo’, TObject(rec));

end;

取值:

PRec(lst.Itmes.Objects[lst.ItemIndex]).a或b,使用之前需要检测是否有TObject。

相关文章:

  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-09-26
  • 2022-03-08
  • 2021-12-05
猜你喜欢
  • 2021-06-10
  • 2021-10-27
  • 2022-12-23
  • 2021-11-06
  • 2021-04-15
  • 2022-12-23
  • 2021-12-31
相关资源
相似解决方案