请问,delphi 那个控件象 ie 地址显示图标输入框控件呢? 请问,delphi 那个控件象 ie 地址显示图标输入框控件呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);var Bitmap: TBitmap; Offset: integer;begin Offset := 0; with (Control as TComboBox).Canvas do begin FillRect(Rect); Bitmap := TBitmap(SelectPort.items.Objects[Index]); if Bitmap <> nil then begin BrushCopy(Bounds(Rect.Left + 2, Rect.Top + 2, Bitmap.Width, Bitmap.Height), Bitmap, Bounds(0, 0, Bitmap.Width, Bitmap.Height), clOlive); Offset := Bitmap.Width + 8; end; // display the text TextOut(Rect.Left + Offset, Rect.Top, SelectPort.items[Index]) end;end; procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);var Bitmap: TBitmap; Offset: integer;begin Offset := 0; with (Control as TComboBox).Canvas do begin FillRect(Rect); Bitmap := TBitmap(ComboBox1.items.Objects[Index]); if Bitmap <> nil then begin BrushCopy(Bounds(Rect.Left + 2, Rect.Top + 2, Bitmap.Width, Bitmap.Height), Bitmap, Bounds(0, 0, Bitmap.Width, Bitmap.Height), clOlive); Offset := Bitmap.Width + 8; end; // display the text TextOut(Rect.Left + Offset, Rect.Top, ComboBox1.items[Index]) end;end; 如何不让浮点数以科学记数法显示 ntdll.dll报错,请各位大侠指点 谁有可以调整窗体所有控件大小及位置的控件呀,就是在窗体改变大小时能保证窗体布局不变!(急急急) 如何在ActivexForm中定向到其他的网页 我用query.sql.add(sysdate-数据库中的一个时间);但显示出来的不是时间的形式。我怎样把它换成分的形式啊? 一个关于线程运行的问题 高手请进!~!!!!!!!!!有分相待!!!!!!!!! 那位大虾能在这里开个delphi开发三层结构的课程? 怎么样写注册表!? 如何自动注册ocx 请推荐一本delphi网络编程的好书!!谢谢!! 关于treeview的图标问题
Rect: TRect; State: TOwnerDrawState);
var
Bitmap: TBitmap;
Offset: integer;
begin
Offset := 0;
with (Control as TComboBox).Canvas do
begin
FillRect(Rect);
Bitmap := TBitmap(SelectPort.items.Objects[Index]);
if Bitmap <> nil then
begin
BrushCopy(Bounds(Rect.Left + 2, Rect.Top + 2, Bitmap.Width,
Bitmap.Height), Bitmap, Bounds(0, 0, Bitmap.Width,
Bitmap.Height), clOlive);
Offset := Bitmap.Width + 8;
end;
// display the text
TextOut(Rect.Left + Offset, Rect.Top, SelectPort.items[Index])
end;
end;
Rect: TRect; State: TOwnerDrawState);
var
Bitmap: TBitmap;
Offset: integer;
begin
Offset := 0;
with (Control as TComboBox).Canvas do
begin
FillRect(Rect);
Bitmap := TBitmap(ComboBox1.items.Objects[Index]);
if Bitmap <> nil then
begin
BrushCopy(Bounds(Rect.Left + 2, Rect.Top + 2, Bitmap.Width,
Bitmap.Height), Bitmap, Bounds(0, 0, Bitmap.Width,
Bitmap.Height), clOlive);
Offset := Bitmap.Width + 8;
end;
// display the text
TextOut(Rect.Left + Offset, Rect.Top, ComboBox1.items[Index])
end;
end;