rt
解决方案 »
- 高手帮忙!--怎么样判断Report窗口是否已经创建??
- 如何用代码修改一个exe或dll文件的版本信息? ===在线等===
- BOLAND公司的认证到底有多大用处????
- 我用ado连接数据库,提示错误“OLE error 80030002”,这是什么意思?
- 紧急求助,在DELPHI编程中如何向access数据库中ole型字段保存图像?
- 请问delete语句删除vfp表的时候,只是从逻辑上删除,并没有从物理上真正删除,怎么删?
- 请教各位大哥图象字段如何在.db数据库表中添加设置。在线等,不见不散
- 再给100分:WideString -> String
- ★★★哪位帮忙将这个函数申明翻译到delphi,多谢了!
- 大家看看这是什么问题呀?
- 从Access数据库中读取图片的问题,在线等!!!!
- syBase 数据库用什么方法连接最高效,ADO?BDE?OTHER?
Rect: TRect; State: TOwnerDrawState);
var
Bitmap: TBitmap;
Offset: Integer;
begin
with (Control as TListBox).Canvas do
begin
FillRect(Rect);
Offset := 2;
//在这里取得图片,例子从TListBox.Items中取(如果添加项的时候指定了图片),也可以从一个
//TImageList中取得
Bitmap := TBitmap((Control as TListBox).Items.Objects[Index]);
if Bitmap <> nil then
begin
BrushCopy(Bounds(Rect.Left + Offset, Rect.Top, Bitmap.Width, Bitmap.Height),
Bitmap, Bounds(0, 0, Bitmap.Width, Bitmap.Height), clRed);
Offset := Bitmap.width + 6;
end;
TextOut(Rect.Left + Offset, Rect.Top, (Control as TListBox).Items[Index])
end;
end;————————————————————————————————————
宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
————————————————————————————————————