Setting the Frame.Typ in Script
Mark Elder
SD, USA
How can I set the Frame.Type in script? I have a frame defined in the designer, but if my field is empty I don't want to print the frame. I am trying this but it will not compile. I get an "Expression Expected" and the cursor is between the square brackets.
procedure Memo24OnAfterData(Sender: TfrxComponent);
begin
if Value = 0 then
begin
Memo24.Frame.Typ := [];
end;
end;
As far as I can tell type "Typ" is a TfrxFrameTypes which is a set of TfrxFrameType
TfrxFrameType = (ftLeft, ftRight, ftTop, ftBottom);
TfrxFrameTypes = set of TfrxFrameType;
If I put something in the set just to see it change that will not work either. This compiles
Memo24.Frame.Typ := [ftBottom];
however when I get to that line I have a runtime error "Could not convert variant of type (Array Variant) into type (Integer)"
procedure Memo24OnAfterData(Sender: TfrxComponent);
begin
if Value = 0 then
begin
Memo24.Frame.Typ := [];
end;
end;
As far as I can tell type "Typ" is a TfrxFrameTypes which is a set of TfrxFrameType
TfrxFrameType = (ftLeft, ftRight, ftTop, ftBottom);
TfrxFrameTypes = set of TfrxFrameType;
If I put something in the set just to see it change that will not work either. This compiles
Memo24.Frame.Typ := [ftBottom];
however when I get to that line I have a runtime error "Could not convert variant of type (Array Variant) into type (Integer)"
Comments
Anyway Thanks gordk!