FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Buttonbar Update or Refresh
Posts: 105
Joined: Fri Jun 09, 2006 03:27 PM
Buttonbar Update or Refresh
Posted: Tue Jan 28, 2014 10:56 PM
I have a Buttonbar that I need to disable buttons on for certain tasks using a logical value.
Code (fw): Select all Collapse
    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
Regards,

Greg Gammon
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Buttonbar Update or Refresh
Posted: Wed Jan 29, 2014 12:36 AM

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 105
Joined: Fri Jun 09, 2006 03:27 PM
Re: Buttonbar Update or Refresh
Posted: Wed Jan 29, 2014 12:45 AM

Yep! I just enable/disable the entire bar: oBar:enable() / oBar:disable()....perfect and simple.
Thanks AGAIN James :)
G

Regards,

Greg Gammon
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Buttonbar Update or Refresh
Posted: Fri Jan 31, 2014 10:41 AM

Greg,

try also oBar:AEvalWhen().

EMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Buttonbar Update or Refresh
Posted: Fri Jan 31, 2014 02:55 PM

Enrico,

oBar:AEvalWhen()

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Buttonbar Update or Refresh
Posted: Fri Jan 31, 2014 04:58 PM
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

Continue the discussion