RzPageControl有多个TabSheet,TabSheet里面有多个GroupBox.GroupBox里面放至了DBGrid判断当前页面DBGrid
程序代码:
procedure TForm1.Button12Click(Sender: TObject;GroupBoxstring:TGroupBox ); var i,j,k:integer; begin j:=RzPageControl1.ActivePageIndex; for i:=0 to RzPageControl1.Pages[j ].ControlCount-1 do if (RzPageControl1.Pages[j].Controls[i] is TGroupBox)then for k:=0 to (RzPageControl1.Pages[j].Controls[i] as TGroupBox).ControlCount - 1 do if ((RzPageControl1.Pages[j].Controls[i] as TGroupBox.NewInstance) is TDBGrid) then showmessage((RzPageControl1.Pages[j].Controls[i] as TDBGrid).Name); end;求教应该怎么写法