The control will be updated while the application idles, or in the case of
menu items - when the menu is opened.

The enabled property should be set in the "onUpdate" event of the action.

If you want to force the target controls to update, you can call
TBasicActionLink.Update (this is done in Menus.pas for instance in
"TMenuItem.InitiateActions")

So if I understand your problem right, just write a handler for onUpdate (or
override TBasicAction.Update) that says
  "Checked := <logical expression involving your Property Entry>"

And then the control will automatigically be updated at some random point in
the future.

It's a "pull" mechanism from the control's perspective rather than a "push"
from the action.
Mike

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Mark Derricutt
> Sent: Monday, 24 July 2000 16:33
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Actions...
>
>
> On Mon, 24 Jul 2000, Mike Mueller wrote:
>
> > Mark - the procedure is called "RegisterActions" & like you say
> it's just
> > like with components
>
> Bah :) Silly me, now why couldn't I find that before :-)
>
> Now, another question, I've been digging through code for the past age and
> can't spot it.  I'm trying to find -where- an action tells the linked
> controls to be enabled or not.  As I'm altering the behaviour of the
> action, I want it to be enabled based on a property entry rather than the
> OnExecute event as normal.
>
> /me pulls hair out :P
>
> --
> Inspired by the taste of horror, proud to be insane forever
> Let out the killer in me! (c) Dismal Euphony
> Now Playing: <no audio cd present>
>
> ------------------------------------------------------------------
> ---------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to