Frank:
The columns, sizes and alignments can be arrays of codeblocks, so if you define your browses this way:
- Code: Select all Expand view
LOCAL VEC_FIELD:={{ || IF((cAlias)->ESTADO=='C','Cerrado','Abierto') } ,;
{ || (cAlias)->PUNTOVTA } ,;
LOCAL VEC_ENC := { oemtoansi("Estado"),;
"Punto"+CRLF+"Venta" ,;
LOCAL aSizes:={80,50, ... }
REDEFINE LISTBOX oBrwMov fields ID 999 OF oDlg ;
ALIAS (cALIAS) ;
COLOR CLR_BLACK, CLR_WHITE UPDATE ;
ON DBLCLICK EditaTurno( @fCantI,@fCantE,oBrwMov, oBrwMov:nColAct, EVAL(VEC_FIELD[oBrwMov:nColAct]), .T.,cAlias )
oBrwMov:SetCols( VEC_FIELD, VEC_ENC, aSizes )
You can read those values from an ini file or dbf perfectly.
And for example if the user changes the size of a column before closing the dialog you can ask the browse for the column sizes values, and save the new values of the array to a dbf or ini file (oBrwMov:aColsizes).
To use a multiline header you only need to use CRLF, like "Punto"+CRLF+"Venta" ,; that is a multiline header. And to jusfify you can use:
- Code: Select all Expand view
oBrwMov:aHJustify := {2, 2, 0, 1 }
oBrwMov:aJustify := {2, 2, 0, 1 }
0=Left, 1=right, 2=centered
Regards,