Page 1 of 1

help urgent : XBROWSE EDIT

Posted: Tue Jan 23, 2007 4:44 pm
by Silvio
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

oApp():oGrid:nClrPane  :={|| IF(( oApp():oGrid:cAlias)->(OrdKeyNo())%2==0,CLR_LGREEN,CLR_LGRAY)}
but it not run ok



Can you write an sample ?

Posted: Tue Jan 23, 2007 9:14 pm
by James Bott
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

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)) }

Posted: Wed Jan 24, 2007 12:13 am
by areang
Mr. James

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

Regards
Areang

Posted: Wed Jan 24, 2007 12:24 am
by James Bott

Code: Select all

  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

Posted: Wed Jan 24, 2007 7:39 am
by Frank Demont
Silvio,

I use :

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

Frank

Posted: Wed Jan 24, 2007 8:26 am
by Silvio
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 ?

Posted: Thu Jan 25, 2007 7:12 am
by areang
Mr. James

Thank's for help

Regards
Areang