|
现因客户需要,在2个页面切换时,要打印的格式不一样,查找BBS上相关的资料,写如下控制代码:
procedure TMerchantSetForm.PageControlOnChange(Sender:TObject);//gexh 2007-12-25
begin
case MERCHANTSETINFO.TMerchantInfoFormDoc(docview1.Doc).kyPageControl1.ActivePageIndex of
0:
begin
DocViewBar1.AutoDetect :=True;
Docview1.SetFocus ;
end ;
1:
begin
DocViewBar1.AutoDetect :=False;
DocViewBar1.DocView :=DocView3;
end;
end;
end;
在操作过程中,功能刚打开时,与从0切换到1时,再从1切换到0时,结果是正确的,但再从0切换到1时,DocViewBar1变为灰色了,请问这是怎么回事? |
|