Buttonbar Update or Refresh

Post Reply
User avatar
Greg Gammon
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Buttonbar Update or Refresh

Post by Greg Gammon »

I have a Buttonbar that I need to disable buttons on for certain tasks using a logical value.

Code: Select all

    DEFINE BUTTONBAR oBar OF oWnd _3D 
        DEFINE BUTTON OF oBar NAME 169  ACTION oWnd:end() MESSAGE "Quit" WHEN !lMenuLock
 
When lMenulock is .T., the button gray's out, but when lMenulock is changed to .F., the button does not reactivate.
I have tried oBtn:refresh() etc. but can't make this work.

Thanks for the help!
G
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Buttonbar Update or Refresh

Post by James Bott »

The easiest solution may be to just do an oBtn:disable()/oBtn:enable() whenever you change lMenuLock.

James
User avatar
Greg Gammon
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Re: Buttonbar Update or Refresh

Post by Greg Gammon »

Yep! I just enable/disable the entire bar: oBar:enable() / oBar:disable()....perfect and simple.
Thanks AGAIN James :)
G
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Buttonbar Update or Refresh

Post by James Bott »

Enrico,

oBar:AEvalWhen()

What exactly does that do? Does it reevaluate the WHEN clauses for every button on the bar?

James
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Buttonbar Update or Refresh

Post by Enrico Maria Giordano »

James,
James Bott wrote:Enrico,

oBar:AEvalWhen()

What exactly does that do? Does it reevaluate the WHEN clauses for every button on the bar?

James
Yes, it should do that.

EMG
Post Reply