The following code
- Code: Select all Expand view
- REDEFINE XBROWSE oLBxa ID 2100 OF oDlu ;
ON DBLCLICK( aPar[ oLbxa:nAt, 1 ] := IIF( aPar[ oLbxa:nAt, 1 ] = "I", "E", "I" ), oDlu:update() ) ;
MESSAGE "Double click on an item to change the Estimate/Invoice status" UPDATE
// Attach the database
oLbxa:setArray( aPar )
// Add the columns
ADD TO oLbxa DATA ARRAY ELEMENT 1 HEADER "S" ALIGN CENTER
ADD TO oLbxa DATA ARRAY ELEMENT 2 HEADER "Quantity" ALIGN RIGHT
ADD TO oLbxa DATA ARRAY ELEMENT 3 HEADER "Partnumber" ALIGN LEFT
ADD TO oLbxa DATA ARRAY ELEMENT 4 HEADER "Description" ALIGN LEFT
add to oLbxa Header " " data SPACE(20 ) // for blank at the end of the header
// Provide the header gradient
oLbxa:bClrGrad := { | lInvert | If( ! lInvert, { { 0.50,16776960,16777215 }, ;
{ 0.50,16777215,16776960 } }, { { 0.50,128,16777215 }, { 0.50,16777215,128 } } ) }
// Set the header and row heights
oLbxa:nHeaderHeight := 30
oLbxa:nRowHeight := 24
// Turn off horizontal scrolling
oLbxa:lHScroll := .F.
// Set the styles
oLbxa:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbxa:nColDividerStyle := LINESTYLE_RAISED
oLbxa:nRowDividerStyle := LINESTYLE_RAISED
has a problem with the display. Although I specify the headers, first I get the columns displayed with Col 1, Col 2, Col 3 Etch on the top, and then I get a second set of columns with the proper headers displayed.
I would appreciate some thoughts on this.