how to set the bg color of a cell in a dynamic browse

Posted by Admin on 14-May-2007 08:15

Hey,

i've recently began to use dynamic tables, queries and browsers. Now i'm stuck.

In a program with a dynamic table, query and browser i need to set the background colour of a number of fields depending a condition.

I got the handle of the cell, but i can not set teh background colour.

Progress tells me that the background colour of the cell is not setable.

how can i work around this problem?

the code is used is something like this:

G-hField = G-hBuffer:BUFFER-FIELD (STRING (dipa.matnid)).

G-hField:BUFFER-VALUE = L-dQuant.

IF AVAILABLE artk AND

(NOT artk.swactief OR CAN-FIND (artg WHERE artg.frmaid = artk.frmaid

AND artg.modlid = artk.modlid

AND artg.kwalid = artk.kwalid

AND artg.VAR = artk.VAR

AND artg.klrnid = artk.klrnid

AND artg.mdtpid = "ACTIVE"

AND artg.matnid = dipa.matnid

AND artg.prgkost = 0))

THEN ASSIGN G-hField:BGCOLOR = 12.

All Replies

Posted by jtownsen on 16-May-2007 05:01

Perhaps try something like:

hBrowse:GET-BROWSE-COLUMN(1):BGCOLOR = 7.

Posted by Admin on 16-May-2007 10:29

You set the bgcolor in the row display trigger.

I tend to avoid dynamic widgets, but you can find an example in the knowledgebase:

KB 21024

Title: "How To Modify Dynamic Browse Column Attributes"

Summary in KBP9248

This thread is closed