Page 1 of 1
Buttonbar Update or Refresh
Posted: Tue Jan 28, 2014 10:56 pm
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
Re: Buttonbar Update or Refresh
Posted: Wed Jan 29, 2014 12:36 am
by James Bott
The easiest solution may be to just do an oBtn:disable()/oBtn:enable() whenever you change lMenuLock.
James
Re: Buttonbar Update or Refresh
Posted: Wed Jan 29, 2014 12:45 am
by Greg Gammon
Yep! I just enable/disable the entire bar: oBar:enable() / oBar:disable()....perfect and simple.
Thanks AGAIN James
G
Re: Buttonbar Update or Refresh
Posted: Fri Jan 31, 2014 10:41 am
by Enrico Maria Giordano
Greg,
try also oBar:AEvalWhen().
EMG
Re: Buttonbar Update or Refresh
Posted: Fri Jan 31, 2014 2:55 pm
by James Bott
Enrico,
oBar:AEvalWhen()
What exactly does that do? Does it reevaluate the WHEN clauses for every button on the bar?
James
Re: Buttonbar Update or Refresh
Posted: Fri Jan 31, 2014 4:58 pm
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