张志峰的博客

水滴石川,积少成多。
随笔 - 1205, 文章 - 0, 评论 - 84, 阅读 - 243万

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

tcxtreelist 展示图片 图像

Posted on   ╰★张志峰★╮  阅读(489)  评论(1编辑  收藏  举报

procedure TfrmstPostImageCollate.LoadCollateImage(AOrderID: integer);
var
mySql: string;
node: TcxTreeListNode;
cPhoto, cFullPhoto: string;
begin
Screen.Cursor := crHourGlass;
tlResult.BeginUpdate;
tlResult.Clear;

LockWindowUpdate(Handle);
mySql := ' Select * from stCardPhotos where iOrderid=' + IntToStr(AOrderID);
OpenQuery(qryUnit, mySql);
try
with qryUnit do
begin
while not Eof do
begin
cPhoto := FieldByName('gPhoto').AsString;
cFullPhoto := FieldByName('cFullPhoto').AsString;

if cFullPhoto <> '' then
begin
node := tlResult.Add;
node.Texts[tlcResGPhoto.ItemIndex] := cPhoto;
node.Texts[tlcResCFullPhoto.ItemIndex] := FieldByName('cFullPhoto').AsString;
end;
Next;
end;
end;
finally
tlResult.EndUpdate;
LockWindowUpdate(0);
Screen.Cursor := crDefault;
end;
end;

如下图:

点击右上角即可分享
微信分享提示