If (ActionList1.Actions[index] is TAction) then
(ActionList1.Actions[index] as TAction).Enabled := True;
Gr.
Robert
Bugs <do...@spamonme.com> wrote in message news:3b0597f2$1_2@dnews...
Just for the sake of promoting an efficient coding style <g>: if you do
the Is test first you don't need to use an As typecast (since you have
already tested that the object is the correct type). So you can change
this to
If (ActionList1.Actions[index] is TAction) then
TAction(ActionList1.Actions[index]).Enabled := True;
which is a tad faster and generates less code.
Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.
I didn't know that.
Peter Below (TeamB) <10011...@compuXXserve.com> wrote in message
news:VA.0000708...@antispam.compuserve.com...