Hola buen dia
lo puedes hacer de dos formas
1,, poner dos columnas en la primera columna poner
if(field->ximporte<0,xfield->ximporte," ")
en la segunda columna poner
if(field->ximporte>0,xfield->ximporte," ")
y queda sin problema
pero si quieres ponerla en la misma columna ay te va el codigo
@ 1, 1 LISTBOX oLbx FIELDS CFACTURA->MFOLIO,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 DTOC(CFACTURA->MFECHA),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 CFACTURA->MNOMBRE,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 alinea(CFACTURA->MIMPORTE,40000,12),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 CHOLO(CFACTURA->MSTATUS);
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 FIELDSIZES 40,80,370,190,80;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 HEADERS 聽 聽"Folio", "fecha","Nombre","Importe","Estatus";
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ON LEFT DBLCLICK (mrec:=recno(),M1016(ODLG,"F", CFACTURA->MFOLIO),Tvamos(mrec));
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ON CHANGE ( ASAMPLE:=HOLALA(ODLG,ASAMPLE,"F",CFACTURA->MFOLIO),oBrw:aArrayData := asample, obrw:refresh() );
聽 聽 聽 聽 聽 COLOR "B+/G+,R,B,B,B+" 聽SIZE 420, 150 font oletras OF oDlg
aunque le puse en listbox funciona en xbrowse
la funcion alinea es la que hace a la izquierda o a la derecha segun sea el importe en este cao le puse 40000 ay le pones cero y se hace la machaca y el doce es el tama帽o a alinear
funcion de alinea
Function alinea(ximporte,xnum,mtama)
local dev:="", mlen:=0, mlen2
聽 ximporte:=alltrim(str(ximporte,14,2))
聽 ximporte:=space(mtama-len(ximporte))+ximporte
聽 if val(ximporte)<xnum
聽 聽 聽 dev:=ximporte 聽 聽 聽// esto lo acomoda a la izquierda automaticamente al quitarle todo los espacios
聽 else
聽 聽 聽 dev:=space(mtama)+ximporte 聽 // aqui agregarle los espacios que desese de separacion
聽 endif
return dev
y ya esta probado anexo imagen en una columa ,, ojo segun el tipo de letra queda alineado otros tipos no alinean bien

Benjamin Casarrubias Moreno
Cd. Obreg贸n, Sonora, M茅xico
chino72vale@hotmail.com
Fivewin 24.04, Harbour 3.3, xharbour 1.2.1, Fivelinux, Visual Estudio 2022
Oracle Api Rest, SDK Contpaq, Facturaci贸n Electr贸nica, XML DIOT 2025