No consigo poder editar un checkbox en el xbrowse con un array en el que la columna puede coger valores .T. o .F.
He estado mirando los ejemplos que aparecen en el foro pero no llego a hacer que funcione.
Adjunto codigo
Agradeceria cualquier ayuda..
Gracias
- Code: Select all Expand view
function BuildBrwPrgs( oFld )
local oCheck
local lOn := .F.
// Estructura del Array de Datos
// static aPrgs := { { "", "", "", "" , .F. } }
@ 0, 0 XBROWSE oBrwPrgs ARRAY aPrgs SIZE 300, 180 PIXEL OF oFld:aDialogs[ 1 ] ;
FONT oFont //CELL
ADD oCheck TO oBrwPrgs HEADER "S" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 5 ] SIZE 18 //CENTER
oCheck:SetCheck( nil , .T. , ) //{"Si","No",""} )
//oBrwPrgs:aCols[ 1 ]:aEditListBound:= { .T. , .F. }
ADD TO oBrwPrgs HEADER "Nombre" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 1 ] SIZE 280 //CENTER
ADD TO oBrwPrgs HEADER "Size" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 2 ] SIZE 80 RIGHT
ADD TO oBrwPrgs HEADER "Fecha" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 3 ] SIZE 80 CENTER
ADD TO oBrwPrgs HEADER "Descripcion" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 4 ] SIZE 300 //CENTER
oBrwPrgs:nMarqueeStyle = MARQSTYLE_HIGHLROW //CELL //HIGHLROW
oBrwPrgs:nRowHeight = 18
oBrwPrgs:bClrSel = { || { CLR_WHITE, CLR_BLUE } }
oBrwPrgs:lFooter = .T.
oBrwPrgs:aCols[ 2 ]:cFooter = "Total Ficheros: " + ;
if( empty( aPrgs[1][1] ), " 0" , Str( Len( oBrwPrgs:aArrayData ) , 4 ) )
//oBrwPrgs:lFastEdit = .T.
oBrwPrgs:aCols[ 5 ]:nEditType = EDIT_GET // LISTBOX
//oBrwPrgs:aCols[ 5 ]:bOnPostEdit = { | o, v | aPrgs[ oBrwPrgs:nArrayAt ][ 4 ] := v }
oBrwPrgs:CreateFromCode()
oFld:aDialogs[ 1 ]:SetControl( oBrwPrgs )
return oBrwPrgs