您的位置:首页 > 其它

tcxtreelist 展示图片 图像

2015-12-16 16:20 176 查看
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;

如下图:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: