本文整理自网络,侵删。
//更新数据 //锁住listview防止刷新 LockWindowUpdate(Self.ListView1.Handle); ListView1.Items.BeginUpdate; try with ListView1 do begin for i := 0 to Items.Count - 1 do begin
Items.Item[i].SubItems.Strings[2] := CurrPx; Items.Item[i].SubItems.Strings[3] := ChangeRate; Items.Item[i].SubItems.Strings[5] := chosenTime;
end; end; finally ListView1.Items.EndUpdate; //解锁listview LockWindowUpdate(0); end;
//增加数据 with listview1.items.add do begin subitems.add(Stockid); subitems.add(StockName); subitems.add(CurrPx); subitems.add(ChangeRate); subItems.Add(Ajson.ItemByName('changeRate').AsString); subitems.add(chosenTime); end;
相关阅读 >>
Delphi webbrowser1 保存文档为 .html
Delphi �c 如何使用datasnap获取作为标头传递的标记?
更多相关阅读请进入《Delphi》频道 >>