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

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

Postby lcortesm67 » Mon Apr 03, 2006 8:40 pm

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
lcortesm67
 
Posts: 10
Joined: Wed Jan 11, 2006 8:07 pm

Postby Antonio Linares » Mon Apr 03, 2006 8:52 pm

Luis,

Pruébalo así:

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

lo intente y salio esto

Postby lcortesm67 » Mon Apr 03, 2006 10:15 pm

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)
lcortesm67
 
Posts: 10
Joined: Wed Jan 11, 2006 8:07 pm

Color en renglon

Postby carlosortiz » Tue Apr 04, 2006 12:07 am

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?
carlosortiz
 
Posts: 39
Joined: Wed Mar 22, 2006 12:53 pm
Location: Córdoba // Argentina

Asunto resuelto, gracias

Postby lcortesm67 » Tue Apr 04, 2006 10:25 pm

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)))}})
lcortesm67
 
Posts: 10
Joined: Wed Jan 11, 2006 8:07 pm


Return to FiveWin para CA-Clipper

Who is online

Users browsing this forum: No registered users and 17 guests