导航:
论坛 -> 盒子之家
斑竹:huadugaojian,sunyesy
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/2/15 17:50:21
标题:
花心萝卜,sephil大哥来帮偶呀?
浏览:2367
加入我的收藏
楼主:
帮偶修正一下,偶调试不出来偶要效果,具体 在程序中都有了?谢谢啦!
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/2/15 18:56:08
2楼:
--
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/2/15 19:34:25
4楼:
是过了 一样的,达不到效果!
----------------------------------------------
作者:
sephil (NAILY Soft)
★☆☆☆☆
-
盒子中级会员
2004/2/15 19:54:47
5楼:
// Delphi code procedure TForm.ComboBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); var pCan: TCanvas; bmp : TBitmap; S : String; begin pCan := ComboBox1.Canvas; if odSelected in State then bmp := Image2.Picture.Bitmap else bmp := Image1.Picture.Bitmap; pCan.FillRect(Rect); pCan.Draw(Rect.Left, Rect.Top, bmp); Inc(pCan.Left, bmp.Width + 4); S := ComboBox1.Items[Index]; DrawText(pCan.Handle, PChar(S), Length(S), Rect, DT_SINGLELINE or DT_VCENTER); end;
----------------------------------------------
Copyright 2008 ? NAILY Soft
Click here to redirect to my home Click here to redirect to my blog
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/2/15 19:56:45
5楼:
老大 偶觉得 要画到这样还挺难的:
此帖子包含附件: 大小: 18.2K
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/2/15 20:00:07
6楼:
偶不知道他是怎么画的:
此帖子包含附件: 大小: 88.7K
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/2/15 20:24:07
7楼:
老大不行啊 差太远了:) pCan := ComboBox1.Canvas; if odSelected in State then bmp := Image2.Picture.Bitmap else bmp := Image1.Picture.Bitmap; pCan.FillRect(Rect); pCan.Draw(Rect.Left, Rect.Top, bmp); Inc(Rect.Left, bmp.Width + 4); S := ComboBox1.Items[Index]; ATextRect.Left :=Rect.Left; ATextRect.Top := Rect.Top ; ATextRect.Right := ATextRect.Left+ ComboBox1.Canvas.TextWidth(s); ATextRect.Bottom :=bmp.Height ; ComboBox1.Canvas.Rectangle(ATextRect); DrawText(pCan.Handle, PChar(S), Length(S), Rect, DT_SINGLELINE or DT_VCENTER);
此帖子包含附件: 大小: 57.6K
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/2/15 20:25:51
8楼:
D7自带有一个扩展的ComboBox ????哦 偶找找!
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/2/15 20:30:14
9楼:
妙妙啊!真牛!真的是这个,老大谢谢提醒啊!
----------------------------------------------