help urgent : XBROWSE EDIT

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

help urgent : XBROWSE EDIT

Post 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 ?
Best Regards, Saludos

Falconi Silvio
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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)) }
areang
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm

Post by areang »

Mr. James

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

Regards
Areang
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
Frank Demont
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Post by Frank Demont »

Silvio,

I use :

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

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

Post 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 ?
Best Regards, Saludos

Falconi Silvio
areang
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm

Post by areang »

Mr. James

Thank's for help

Regards
Areang
Post Reply