Page 1 of 1

Como hacer que en tsbrowse, me salga el texto de 2 colores

Posted: Mon Apr 03, 2006 8:40 pm
by lcortesm67
amigos mi problema es que tengo un browse (tsbrowse), con celdas de fondo amarillo y letras azules, pero mi intencion es que segun una condicion los mayores a cero, salgan Azul/Amarillo y de lo contrario Rojo/Amarillo, lo he intentado, y es mas me han ayudado (A.A.), y no lo consigo, que estoy haciendo mal...

oLbx1:SetColor( {1, 2}, {|| If( Tot_Fac > 0, {C_FONDO,C_TEXTA},{C_FONDO,C_TEXTR})},)

c_fondo=amarillo
c_texta=azul
c_textr=rojo

es mas ni funciona ahora

Posted: Mon Apr 03, 2006 8:52 pm
by Antonio Linares
Luis,

Pruébalo así:

oLbx1:SetColor( {|| If( Tot_Fac > 0, {C_FONDO,C_TEXTA},{C_FONDO,C_TEXTR})} )

lo intente y salio esto

Posted: Mon Apr 03, 2006 10:15 pm
by lcortesm67
Application
===========
Path and name: C:\SIST02\GESTION.dwd
Size: 0 bytes
Max files handles permited: ( SetHandleCount() ) 100
Error ocurred at: 03/04/2006, 18:12:23
Error description: Error BASE/1068 Argument error: array access
Args:
[ 1] = U

Stack Calls
===========
Called from LOCKERRHAN(0)
Called from (b)INITHANDL$(0)
Called from TSBROWSE:SETCOLOR(6857)
Called from VIS_258(1812)
Called from (b)PRG258(1526)
Called from TBUTTON:CLICK(148)
Called from TBUTTON:HANDLEEVEN(0)
Called from SENDMESSAG(0)
Called from TDIALOG:COMMAND(0)
Called from TDIALOG:HANDLEEVEN(0)
Called from DIALOGBOX(0)
Called from TDIALOG:ACTIVATE(0)
Called from PRG258(1531)
Called from (b)BUILDMENU(352)
Called from TMENU:COMMAND(0)
Called from TMDIFRAME:COMMAND(0)
Called from TMDIFRAME:COMMAND(0)
Called from TMDIFRAME:HANDLEEVEN(0)
Called from WINRUN(0)
Called from TMDIFRAME:ACTIVATE(0)
Called from MAIN(106)

Color en renglon

Posted: Tue Apr 04, 2006 12:07 am
by carlosortiz
Me parecio o tenias una coma de mas al final.

Proba con algo similar a lo de abajo. Espero te sirva.

// Defino el color del registro según el estado.
oBrwTurnos:SetColor( { 1}, { { | | if( turnos->status="A",rgb(0,128,64), if( turnos->status="D", rgb(85,85,85), if(turnos->status="C",rgb(200,0,0),rgb(0,0,0)) ) ) } } )

Salu2.
Que version de tsbrowse usas?

Asunto resuelto, gracias

Posted: Tue Apr 04, 2006 10:25 pm
by lcortesm67
el problema quedo resuelto, gracias...
respuesta:

oLbx1:SetColor( { 1}, {{ || if( tot_fac>0,rgb(0,0,255),if(tot_fac<0,rgb(255,0,0),rgb(0,0,0)))}})