header with a UDF

header with a UDF

Postby hag » Mon Jun 07, 2010 5:23 am

How can I click on the header of a column in xbrowse and bring up a user defined function?
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: header with a UDF

Postby Richard Chidiak » Mon Jun 07, 2010 6:01 am

oBrw:aCols[xx]:bLClickHeader := {||yourfunction() }

HTH
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: header with a UDF

Postby hag » Tue Jun 08, 2010 11:59 pm

thanks for the help. haven't tried it yet. Will tonite or tomorrow.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: header with a UDF

Postby hag » Wed Jun 09, 2010 11:05 pm

I keep getting abound array access error.

Here is the code sample I use.
Its a xbrowse from resources.

What am I doing wrong. Thanks for the help.



Code: Select all  Expand view

local aCols[24] 

oBrw:aCols[8]:bLClickHeader := {||msgInfo("Works") }

 ADD column  to xbrowse oBrw;
   DATA {|| if(drill->title == repli('-', 30), repli(' ', 20), ;
   if(drill->title == repli('=', 30), repli(' ', 20), ;
   oBrw:oDbf:drill:Invoice)) };
   SIZE 50 LEFT HEADER "Invoice" COLOR CLR_BLACK,CLR_WHITE

 
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: header with a UDF

Postby Richard Chidiak » Thu Jun 10, 2010 8:05 pm

Harvey

Make sure oBrw:aCols[8]:bLClickHeader := {||msgInfo("Works") } is after column definition

HTH

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: header with a UDF

Postby hag » Thu Jun 10, 2010 9:58 pm

perfect :D
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 90 guests