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.
Perhaps try something like:
hBrowse:GET-BROWSE-COLUMN(1):BGCOLOR = 7.
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