var t: TfrMemoView; begin t := TfrMemoView(frReport1.FindObject('Memo1')); if t <> nil then t.Memo.Text := 'FastReport'; // or this: if t <> nil then t.Prop['Memo'] := 'FastReport'; end;
for i:=0 to GroupBox4.ControlCount-1 do begin if GroupBox4.Controls[i].ClassType=TLabel then (GroupBox4.Controls[i] as TLabel).Enabled:=not (GroupBox4.Controls[i] as TLabel).Enabled; if GroupBox4.Controls[i].ClassType=TEdit then (GroupBox4.Controls[i] as TEdit).Enabled:=not (GroupBox4.Controls[i] as TEdit).Enabled; if GroupBox4.Controls[i].ClassType=TCombobox then (GroupBox4.Controls[i] as TCombobox).Enabled:=not (GroupBox4.Controls[i] as TCombobox).Enabled; if GroupBox4.Controls[i].ClassType=TDateTimePicker then (GroupBox4.Controls[i] as TDateTimePicker).Enabled:=not (GroupBox4.Controls[i] as TDateTimePicker).Enabled; end;类似这样可行吗?
t: TfrMemoView;
begin
t := TfrMemoView(frReport1.FindObject('Memo1')); if t <> nil then
t.Memo.Text := 'FastReport';
// or this:
if t <> nil then
t.Prop['Memo'] := 'FastReport';
end;
begin
if GroupBox4.Controls[i].ClassType=TLabel then
(GroupBox4.Controls[i] as TLabel).Enabled:=not (GroupBox4.Controls[i] as TLabel).Enabled; if GroupBox4.Controls[i].ClassType=TEdit then
(GroupBox4.Controls[i] as TEdit).Enabled:=not (GroupBox4.Controls[i] as TEdit).Enabled; if GroupBox4.Controls[i].ClassType=TCombobox then
(GroupBox4.Controls[i] as TCombobox).Enabled:=not (GroupBox4.Controls[i] as TCombobox).Enabled; if GroupBox4.Controls[i].ClassType=TDateTimePicker then
(GroupBox4.Controls[i] as TDateTimePicker).Enabled:=not (GroupBox4.Controls[i] as TDateTimePicker).Enabled;
end;类似这样可行吗?