FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oBarGet on xbrowse header
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
oBarGet on xbrowse header
Posted: Thu Dec 07, 2017 12:57 AM
Hello everyone!

1. Is it possible to have a button or a series of buttons on the header of an xbrowse column?

2. I tried to add a button to the get object on the header of an xbrowse but I get a runtime error. I'm guessing the get object hasn't been instantiated until :CreateFromCode() is executed.

Code (fw): Select all Collapse
...
      :nHeaderHeight := 40 
      :lGetBar       := .t.
      :oCol:oBarGet:bAction   := {|| MsgInfo( "clicked ") }
      :oCol:oBarGet:cBmpName  := "SEARCH16"
      :oCol:oBarGet:cCueText  := "Filtered ManagerID"



Error occurred at: 12/06/2017, 19:45:21
Error description: Error BASE/1005 No exported variable: BACTION
Args:
[ 1] = U
[ 2] = B {|| ... }


Any Ideas?


Reinaldo.
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: oBarGet on xbrowse header
Posted: Thu Dec 07, 2017 08:26 AM
Hello,
I think you need to call
Code (fw): Select all Collapse
:oCol:CreateBarGet()
before access it...
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: oBarGet on xbrowse header
Posted: Thu Dec 07, 2017 04:07 PM
Mr Reinaldo

As of now, this is not possible.


2. I tried to add a button to the get object on the header of an xbrowse but I get a runtime error. I'm guessing the get object hasn't been instantiated until :CreateFromCode() is executed.


oBarGets are created during execution of oBrw:Adjust() by calling an "internal" method oCol:CreateBarGet(). WIKI clearly lists this as one of the internal methods.

oBrw:Adjust() method is executed in oBrw:CreateFromCode() in case of browses on windows and ON INIT in case of browses on Dialogs.

After oBrw:Adjust() is executed, oBarGets of the specified columns are created but now it is too late to add button and bAction, because we need to do this at the time of creation of Get.
Regards



G. N. Rao.

Hyderabad, India
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: oBarGet on xbrowse header
Posted: Thu Dec 07, 2017 04:22 PM
nageswaragunupudi wrote:oBarGets are created during execution of oBrw:Adjust() by calling an "internal" method oCol:CreateBarGet(). WIKI clearly lists this as one of the internal methods.


Just for curiosity, why is it not declared as hidden ?
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: oBarGet on xbrowse header
Posted: Thu Dec 07, 2017 04:51 PM

Yes, we could have declared this method as protected.

Regards



G. N. Rao.

Hyderabad, India
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: oBarGet on xbrowse header
Posted: Fri Dec 08, 2017 05:45 PM
nageswaragunupudi wrote:Mr Reinaldo

After oBrw:Adjust() is executed, oBarGets of the specified columns are created but now it is too late to add button and bAction, because we need to do this at the time of creation of Get.


I suppose it wouldn't be too complicated to add a couple of new DATA to the column object so that bAction and cbitmap to be used with the TGet object be declared before it is created. I will do it on my end while it gets added to xbrowse.

Reinaldo.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: oBarGet on xbrowse header
Posted: Fri Dec 08, 2017 05:46 PM

yes

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: oBarGet on xbrowse header
Posted: Fri Dec 15, 2017 03:31 PM

Provided in 17.12.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion