help urgent : XBROWSE EDIT

help urgent : XBROWSE EDIT

Postby Silvio » Tue Jan 23, 2007 4:44 pm

is possible EDIT on XBrwose Directly a DATE FIELD ?

is possible open a dtpicker control when I click on this field ?

can I use a edit_listbox with dtpicker control ?

is possible put different color on each lines of xbrowse ?
I made :
Code: Select all  Expand view
oApp():oGrid:nClrPane  :={|| IF(( oApp():oGrid:cAlias)->(OrdKeyNo())%2==0,CLR_LGREEN,CLR_LGRAY)}


but it not run ok



Can you write an sample ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby James Bott » Tue Jan 23, 2007 9:14 pm

Silvio,

This is what I use with TWBrowse to get alternating row colors. This works with filters, indexes, and deleted records. It should work with TXBrowse also.

James


Code: Select all  Expand view
lClrFlag:=.f.

oLbx:bSkip:={| nRecs |  (nRecs:= ::oInvmast:skipper( nRecs ), lClrFlag:=if(nRecs/2 = int(nRecs/2), lClrFlag,!lClrFlag), nRecs) }

oLbx:nClrPane := { || if(lClrFlag, rgb(255,255,235), rgb(192,208,179)) }
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby areang » Wed Jan 24, 2007 12:13 am

Mr. James

Can you give me full example ?
How to put this code on tx or tw class
Thank's

Regards
Areang
areang
 
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm

Postby James Bott » Wed Jan 24, 2007 12:24 am

Code: Select all  Expand view
  define window oWnd

   use customer
   database oCust
   
   @ 0,0 listbox oLbx fields oCust:company, oCust:address alias oCust:cAlias of oWnd
   
   lClrFlag:=.f.

   oLbx:bSkip:={| nRecs |  (nRecs:= ::oCust:skipper( nRecs ), lClrFlag:=if(nRecs/2 = int(nRecs/2), lClrFlag,!lClrFlag), nRecs) }

   oLbx:nClrPane := { || if(lClrFlag, rgb(255,255,235), rgb(192,208,179)) }   
   
   oWnd:oClient:= oCust
   
   activate window oWnd
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Frank Demont » Wed Jan 24, 2007 7:39 am

Silvio,

I use :

oBrw:bClrStd := {|| {CLR_BLACK, iif( oBrw:nArrayAt % 2 = 0, CLR_1, CLR_2 ) } }

Frank
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Silvio » Wed Jan 24, 2007 8:26 am

thanks franks
I resolve for the colors ....

but i have the last problem
I want edit the field into xbrowse , the field is a date() type , How I can create a codeblock use with onpostedit clausole ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby areang » Thu Jan 25, 2007 7:12 am

Mr. James

Thank's for help

Regards
Areang
areang
 
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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