C
chenhaobo
Unregistered / Unconfirmed
GUEST, unregistred user!
問題?//ActionList.Actions//
Procedure TfrmMain.ExecRights;
var
sname : String;
i : integer;
begin
sname := PubQy.FieldByName('RObject').AsString;
for i := 0 to ActionList1.ComponentCount do
if ActionList1.Actions.Name=sname then
TAction(ActionList1.Actions).Enabled := true;// 動態設定出錯???????
end;
/////可惜ActionList.Actions無enabled屬性!
請問真確的代碼應該如何改寫呢?
Procedure TfrmMain.ExecRights;
var
sname : String;
i : integer;
begin
sname := PubQy.FieldByName('RObject').AsString;
for i := 0 to ActionList1.ComponentCount do
if ActionList1.Actions.Name=sname then
TAction(ActionList1.Actions).Enabled := true;// 動態設定出錯???????
end;
/////可惜ActionList.Actions無enabled屬性!
請問真確的代碼應該如何改寫呢?