不对,请看fr_fmted.pas
procedure TfrFmtForm.FormDeactivate(Sender: TObject);
var
c: Char;
begin
if ModalResult = mrOk then
begin
Format := CatLB.ItemIndex * $01000000 + TypeLB.ItemIndex * $00010000 +
StrToIntDef(DecEdit.Text, 0) * $00000100;
c := ',';
if SplEdit.Text <> '' then
c := SplEdit.Text[1];
Format := Format + Ord(c);
if FormatEdit.Enabled then
FormatStr := FormatEdit.Text;
end;
end;
procedure TfrMemoView.P1Click(Sender: TObject);
var
t: TfrView;
i: Integer;
begin
frDesigner.BeforeChange;
with TfrFmtForm.Create(nil)do
begin
Format := Self.Format;
FormatStr := Self.FormatStr;
if ShowModal = mrOk then
for i := 0 to frDesigner.Page.Objects.Count - 1do
begin
t := frDesigner.Page.Objects;
if t.Selected and ((t.Restrictions and frrfDontModify) = 0) then
begin
(t as TfrMemoView).Format := Format;
(t as TfrMemoView).FormatStr := FormatStr;
end;
end;
Free;
end;
end;