我在字段的OnSetText和OnGetText事件中写代码 procedure TdmBasicMDForm.RecordStateGetText(Sender: TField; var Text: String; DisplayText: Boolean); begin case Sender.AsInteger of 1:Text:='普通用户'; 2:Text:='超级用户'; 0:Text:='管理员'; end; end; 我这么做的,跟本都不能运行运行 提示:Left side connot be assigned to错误
var asinteger :integer; asinteger:=FieldByName('user').AsString; begin case AsInteger of 1:Text:='普通用户'; 2:Text:='超级用户'; 0:Text:='管理员'; end;
procedure TdmBasicMDForm.RecordStateGetText(Sender: TField;
var Text: String; DisplayText: Boolean);
begin
case Sender.AsInteger of
1:Text:='普通用户';
2:Text:='超级用户';
0:Text:='管理员';
end;
end;
我这么做的,跟本都不能运行运行
提示:Left side connot be assigned to错误
asinteger:=FieldByName('user').AsString;
begin
case AsInteger of
1:Text:='普通用户';
2:Text:='超级用户';
0:Text:='管理员';
end;
如:
Field[0].DisplayText := 管理员
Field[1].DisplayText := 普通用户
Field[2].DisplayText := 超级用户
老兄:你说的应该加到哪里呀?!!!!
请赐教!!!