如何让Image在Edit控件上面显示?(10分)

B

bbscom

Unregistered / Unconfirmed
GUEST, unregistred user!
如何让Image在Edit控件上面显示?
在Form窗口里,Edit控件只能在Image上显示,现在我要让Image在Edit控件上面显示怎么现实?
 
没有明白你的意思
 
楼主是想用Image遮盖住Edit吗?如果是这样,那就把Image放在panel上,用panel盖住Edit
 
是将Image遮盖住Edit上方,因为我Image要装载透明图形。使用Panel不可行。
[red]如何将Image遮盖住Edit上方显示?[/red]
 
使用ehlib控件,
DBEditEh
 
tflatpanel有透明效果, 去下载控件
 
你好!我已经从delphifans.com下载FlatStyle控件,是2004年发布的旧版。
在使用过程中发现还是不能解决问题,也就是说控件并没有透明功能,所以还是不能解决问题。
[red]请大家帮助!如何将Image遮盖住Edit上方显示?[/red]
 
delphi7 中有没有能承载多个图片的控件啊
 
此问题还没有解决,请大家继续出力!!!
[blue]如何将Image遮盖住Edit上方显示,但Image是透明的图形?[/blue]
 
Image.Parent := Edit;
 
首先要弄明白VCL体系···什么是组件,什么是控件,那么这个问题就好分析了
如果要达到你要的那中效果,可以取巧啊!
把Edit的Visible属性设置为false
 
这样也行不通,因为Image有可能盖住Edit上方半边,另半边就是Image是透明的图形
[green]如何将Image遮盖住Edit上方显示,但Image是透明的图形?[/green]
 
为了方便理解我做了一个图。
其目的是数据上方有一个透明图,同时可以看到下面的数据。
1.gif
 
看了图,可以做到的。
 
kinneng,你好!应该如何实现?
 
http://hi.baidu.com/29027288/album/item/7f2bdd63fd3804c8e6113a69.html
 
3868474, 你好!能否把代码粘出来。
 
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls;
type
TForm1 = class(TForm)
Panel2: TPanel;
Button1: TButton;
Edit1: TEdit;
Image3: TImage;
PaintBox1: TPaintBox;
procedure Button1Click(Sender: TObject);
procedure PaintBox1Paint(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
bmp: TBitmap;
implementation
{$R *.dfm}
procedure TfrmXsjs.FormDestroy(Sender: TObject);
begin
inherited;
if assigned(bmp) then
bmp.free;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
if not assigned(bmp) then
bmp := TBitmap.Create;
bmp.Transparent := true;
bmp.Width := clientRect.Right - clientRect.Left;
bmp.Height := clientRect.Bottom - clientRect.top;
bmp.Canvas.CopyRect(ClientRect, Canvas, ClientRect);
Panel2.Visible := true;
panel2.BringToFront;
end;

procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
if assigned(bmp) then
paintBox1.Canvas.CopyRect(ClientRect, bmp.Canvas, ClientRect);
end;

end.
 
3868474,你好!
首先感谢你的支持,不过你离解决IMAGE里的透明图还差一步。
我的意思是IMAGE里预先就是一个透明的图,但通过你的COPY后就不透明了,所以还要解决这一点。
 
image和paintBox1放在panel中, 开始时并不显示, 何来copy?
bringtofront时再显示, image还是透明的.
image应放在paintBox1的上面
 
顶部