tcxtreelist 展示图片 图像
2015-12-16 16:20
218 查看
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;
如下图:
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;
如下图:
相关文章推荐
- 老李分享:《Linux Shell脚本攻略》 要点(六)下
- 带头尾节点的双向循环链表
- 老李分享:《Linux Shell脚本攻略》 要点(六)上
- Android中Canvas类的介绍
- leetcode -- N-Queens I&II,经典回溯,再看
- opencv是什么
- CNN卷积神经网络应用于人脸识别(详细流程+代码实现)
- 如何修改IE浏览器文本模式
- 民意调查Django实现(四)
- Java工程师被阿里拒绝的理由都有哪些?
- spring 注意点
- js获取鼠标位置的各种方法
- 配置Server.xml
- 使用IScroll5实现滚动
- 老李分享:《Linux Shell脚本攻略》 要点(五)
- 官网 下载webrtc需求软件准备
- 面试题20:树的子结构(offer)
- 旋转图片并保存
- NodeJS+ExpressJS解决跨域请求CORS
- NSValue / NSNumber 拆包与封装