有呀,就是ComboboxEx呀,在WIN32那一面板中!
解决方案 »
- Bing(必应) P2P 广域网版本正式开放测试, 内外网皆可沟通,支持广域网聊天,有防火墙穿透能力!
- richtextbox的字体颜色怎么改?
- 如何获得系统图标的ID
- 怎样让Edit1只接收英文字母,而且当输入小写字母时自动转为大写字母显示的edit1中?
- 在一个MDI窗体中,有N个ChildForm, 它们每个Form中 都有一个a函数, 请问程序运行后,怎样调用每个Form中的函数呢?
- 应用程序退出时如下错是什么原因?(高分求解)
- 很急的问题,大家帮忙啊!
- 请问如何得到软件所在的目录?等待中。。。。。。。
- 关于COM+的问题,急!!!!!!!
- 在线等,如何把fastreport里面生成的随机数传回给delphi?
- 帮我看看这段程序
- 多线程与数据库问题,在线等候
procedure TUser_EditForm.ComboBox1DrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
var
Btm:TBitmap;
begin
Btm:=TBitmap.create;
ComboBox1.Canvas.StretchDraw(Rect,Btm);
ComboBox1.Canvas.Brush.Bitmap:=nil;
end;
Rect: TRect; State: TOwnerDrawState);
var bitmap:TBitmap;
pos:Integer;
begin
with Control as TComboBox do begin
Canvas.FillRect(Rect);
bitmap:=TBitmap(Items.Objects[Index]);
pos:=0;
if Bitmap<>nil then begin
Canvas.BrushCopy(Bounds(Rect.Left+2,Rect.Top+2,bitmap.Width,bitmap.Height),
bitmap,Bounds(0,0,bitmap.Width,bitmap.Height),clRed);
pos:=bitmap.width+8;
end;
Canvas.TextOut(Rect.Left+pos,Rect.Top,Items[Index]);
end;
end;procedure TForm1.ComboBox1MeasureItem(Control: TWinControl; Index: Integer;
var Height: Integer);
begin
Height:=20;
end;procedure TForm1.Button1Click(Sender: TObject);
var bitmap:TBitmap;
begin
bitmap:=TBitmap.Create;
try
bitmap.LoadFromFile(DirectoryListBox1.Directory+'\'+Edit1.Text);
except
bitmap:=nil;
end;
ComboBox1.Items.AddObject(Edit2.Text,bitmap);
end;end.