Clarion - color en celda de QUEUE

 
Vista:
sin imagen de perfil

color en celda de QUEUE

Publicado por color en celda de QUEUE (25 intervenciones) el 22/01/2011 18:28:21
Tengo cargada una Queue y la estoy mostrando en pantalla.
El asunto es que necesito que de acuerdo a una condicion, se pueda colocar de un color u otro algunas celdas.

He utilizado

?List1{PROPSTYLE:FontName, 2} = FONT:Regular
?List1{PROPSTYLE:TextColor, 2} = COLOR:black
?List1{PROPSTYLE:BackColor, 2} = COLOR:Yellow
?List1{PROPSTYLE:TextSelected, 2} = COLOR:black
?List1{PROPSTYLE:BackSelected, 2} = COLOR:yellow
?List1{PROPSTYLE:FontSize, 2} = 10
?List1{PROPSTYLE:FontStyle, 2} = 8192

?List1{PROPLIST:ColStyle,2} = 2

Lo anterior le da color a toda la columna y eso no es lo que necesito.

Como le doy color a una sola Celda segun una condicion ??????

Muchas gracias por la ayuda !!!!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:color en celda de QUEUE

Publicado por marin (9 intervenciones) el 22/01/2011 19:44:11
Conditionally underline row in listbox

Some of this is ABC template specific, but the theory stays the same regardless:

1. In the list box formatter, check on the "Style" box for each field in the row. (NOTE: Use either Style OR Color, never both. You can control color with the style.)

2. In the Window's Init set up "Normal" and "Underline" Styles like this:
! Normal
?List1{PROPSTYLE:FontName , 1} = 'Arial'
?List1{PROPSTYLE:FontSize , 1} = 10
?List1{PROPSTYLE:FontStyle, 1} = FONT:Regular
?List1{PROPSTYLE:TextColor, 1} = COLOR:Black
?List1{PROPSTYLE:BackColor, 1} = COLOR:White
?List1{PROPSTYLE:TextSelected, 1} = COLOR:White
?List1{PROPSTYLE:BackSelected, 1} = COLOR:Navy

! Underlined
?List1{PROPSTYLE:FontName , 2} = 'Arial'
?List1{PROPSTYLE:FontSize , 2} = 10
?List1{PROPSTYLE:FontStyle, 2} = FONT:Bold + FONT:Underline
?List1{PROPSTYLE:TextColor, 2} = COLOR:Navy
?List1{PROPSTYLE:BackColor, 2} = COLOR:White
?List1{PROPSTYLE:TextSelected, 2} = COLOR:White
?List1{PROPSTYLE:BackSelected, 2} = COLOR:Black

3. If this is an ABC Browse, there is a style tab where you can specify 1 as the default style number and 2 as the style # to use if your condition is met. If this is hand coded, use a long field in the queue after each field being displayed and set this to either 1 or 2 for the style desired.

The following combination worked for me:

MyQ Queue,Pre(MyQ)
Field1 STRING(10) !These Larger than needed for underline
FontStyleField1
Field2 STRING(50) !These Larger than needed for underline
FontStyleField2
Field3 STRING(50)
END

!Checked Style for Column 1 and Column2 in List Box

?MyList{PropStyle:FontStyle,1}=FONT:Regular
?MyList{PropStyle:FontStyle,2}=FONT:Underline


IF UnderLineCondition=TRUE
!Field 1 and 2 are underlined
FontStyleField1=2
FontStyleField2=2
Field1=CLIP(Field1) ALL('_',SIZE(Field1)
Field2=CLIP(Field2) ALL('_',SIZE(Field2)
ELSE
!Field 1 and 2 are not underlined
FontStyleField1=1
FontStyleField2=1
END
PUT(MyQ)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:color en celda de QUEUE

Publicado por color en celda de QUEUE (25 intervenciones) el 22/01/2011 22:12:29
No entiendo muy bien.

Yo solo quiero colocarle un color a una celda de acuerdo a una conidicio ??????

Gracias
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:color en celda de QUEUE

Publicado por Marcelo Madelon (572 intervenciones) el 25/01/2011 01:22:47
Hola

En el caso que la Queue se llame: QResumen
y el list ?QResumen

GET(QResumen,CHOICE(?QResumen)) ! Leo la queue para saber que valor tiene
IF ERRORCODE() THEN
MESSAGE(Aca paso algo.... No pudo leer ,'Mensaje del Sistema',ICON:Exclamation)
RETURN Level:Fatal ! Salir del programa
END

IF QR:SitIva = 1
?QResumen{PROP:color, 2} = COLOR:Green
else
?QResumen{PROP:color, 2} = COLOR:Red
END
display

Avisa si te sirvio. Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:color en celda de QUEUE

Publicado por Color en Queue (25 intervenciones) el 25/01/2011 05:17:17
No funciono

El unico efecto logrado fue darle un color a la celda al momento de seleccionarla.

Por otro lado se debe marcar algo en las propiedades de la grilla.

Graciasssssssssssss
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:color en celda de QUEUE

Publicado por Marcelo Madelon (572 intervenciones) el 25/01/2011 15:14:12
Bueno estoy de vacaciones, revisé el foro y traté de ayudarte.
Demasiado bien funcionó pensando que el código que te pasé fue de memoria. Cuando llegue a la oficina y si todavía no lo resolviste, vemos que se puede hacer.

Saludos desde los lagos del sur – (Argentina).
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:color en celda de QUEUE

Publicado por Color en Queue (25 intervenciones) el 25/01/2011 20:49:56
Muchas gracias

seguire intentando
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar