高分求解几个关于StringGrid.问题。(在线等待) ,还剩两个。 (300分)

  • 主题发起人 chuwenyong
  • 开始时间
C

chuwenyong

Unregistered / Unconfirmed
GUEST, unregistred user!
我采用StringGrid重画,以满足我的需求,如今碰到如下问题:
1。在Grid的DragMode 为dmManual时,当按住鼠标左键选择时,当移出表格的范围,表格会
自动滚动,而设置为:dmAutomatic时,接下鼠标移动则变成了拖动,但是不能自动滚动到
未显示的表格上面。 如今我需要拖动,但也想让其自动滚动,应如何实现?
2。我在Grid 的每一格上显示一个bitmap,如何设置其背景为透明?现在我选择上一格时,
背景显示在那非常不好看。
3。如何读一个TimageList里的一个图片保存到一个TBitmap变量里?(已经解决)
 
为什么没人回答?
 
3.Retrieves a specified image as a bitmap.
procedure GetBitmap(Index: Integer; Image: TBitmap);
Description
Use the GetBitmap method to obtain a particular image in the image
list as a bitmap object. Index denotes the index of the image. GetBitmap
assigns the image to the TBitmap object passed in as the Image parameter.
 
只会第三个:
TImageList.GetBitmap(Index : integer; Image : TBitmap)
具体用法参考帮助吧。
 
自己处理拖动事件。
 
3:
procedure TForm1.Button1Click(Sender: TObject);
var
Bitmap: TBitmap;
begin
Bitmap:=TBitmap.Create;
try
ImageList1.GetBitmap(1, Bitmap);
Image1.Picture.Bitmap:=Bitmap;
finally
Bitmap.Free;
end;
end;
 
OK,图象问题已经解决,那
TO:jsxjd
如何处理拖动事件?
 
可以把image嵌到cell中,就透明了,image可透明
个人想法,潜入过edit,button等,image没实际嵌过
 
多人接受答案了。
 
顶部