quickreport控件透明(300分)

  • 主题发起人 一生中最爱
  • 开始时间

一生中最爱

Unregistered / Unconfirmed
GUEST, unregistred user!
qrlabel,qrimage,qrshape在form上怎样和label,image,shapge(bevel)样透明显示,请高手
指点,up有分
 
Transparent:=true呀
 
不管用,是要求在访控件的form上透明,不是在preview中
 
这个控件在设计就不会透明,没办法.
 
你想干嘛?是做自定义报表吗?呵呵,我有例子
 
我的意思是直接使用quickreport中的控件替代label,shape等控件,做输入界面,若加入图片
做背景,qrlabel等不透明,我的email是han_shujiang@sohu.com,若能解决透明的话,给我发
过来,或贴出,谢谢大家了.
 
透明的例子我是没有啦!呵呵,你的做法让我有一个疑惑。为什么要这样做啊?
呵呵,怎么反过来是我问你啦。。。。
 
只有UP喽!
 
输入界面用标准控件,报表用报表控件,同样的一个输入界面,我们得费两遍的
功夫,若能直接用报表控件作输入界面,不就省市了么。当然也可以直接把form
上的控件向打印机上画,但我现在还需要在屏幕上放张白纸,当然用quickreport
最省市了,故有此问题
 
为何不动态产生报表控件呢?

procedure TCustomLabelForm.CreateReport(var aReport: TQuickRep);
var
i:integer;
aQRLabel:TQRLabel;
aQRShape:TQRShape;
begin
aReport.Bands.HasDetail := true;
for i:= 0 to aReport.ControlCount-1 do
begin
if aReport.Controls.ClassName='TStaticText' then
begin
aQRLabel := TQRLabel.Create(aReport);
with aReport.Controls as TStaticText do
begin
aQRLabel.Parent := Parent;
aQRLabel.AutoSize := false;
aQRLabel.Left := Left ;
aQRLabel.Top := Top;
aQRLabel.Width := Width;
aQRLabel.Height := Height;
aQRLabel.Font := Font ;
aQRLabel.Caption := Caption;
aQRLabel.Alignment := Alignment;
aQRLabel.Color := Color;
end;
end;
if aReport.Controls.ClassName='TShape' then
begin
aQRShape := TQRShape.Create(aReport);
with aReport.Controls as TShape do
begin
aQRShape.Parent := Parent;
aQRShape.Left := Left ;
aQRShape.Top := Top;
aQRShape.Width := Width;
aQRShape.Height := Height;
end;
end;
// showmessage(aReport.Controls.Name+' , '+aReport.Controls.ClassName+inttostr(aReport.Controls.Tag));
end;

end;
 
当然可以了,但没有这么做方便。若不加图片,用白色底片,通过修改quickreport代码,
已实现了lable与qrlabel,shape(bevel)与qrshape的统一
 
嗯。。。这样啊。那你自已去看看TCustomLabel的代码吧。里面有关于透明的做法。
偶这里没DELPHI。也帮不了你啦。就此隐身。呵呵
 
多人接受答案了。
 
顶部