oBarGet on xbrowse header

oBarGet on xbrowse header

Postby reinaldocrespo » 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: Select all  Expand view  RUN

...
      :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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: oBarGet on xbrowse header

Postby AntoninoP » Thu Dec 07, 2017 8:26 am

Hello,
I think you need to call
Code: Select all  Expand view  RUN
:oCol:CreateBarGet()
before access it...
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: oBarGet on xbrowse header

Postby nageswaragunupudi » Thu Dec 07, 2017 4: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
User avatar
nageswaragunupudi
 
Posts: 10663
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: oBarGet on xbrowse header

Postby AntoninoP » Thu Dec 07, 2017 4: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 ?
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: oBarGet on xbrowse header

Postby nageswaragunupudi » Thu Dec 07, 2017 4:51 pm

Yes, we could have declared this method as protected.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10663
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: oBarGet on xbrowse header

Postby reinaldocrespo » Fri Dec 08, 2017 5: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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: oBarGet on xbrowse header

Postby nageswaragunupudi » Fri Dec 08, 2017 5:46 pm

yes
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10663
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: oBarGet on xbrowse header

Postby nageswaragunupudi » Fri Dec 15, 2017 3:31 pm

Provided in 17.12.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10663
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 60 guests