Written by

Question Nezla · Oct 19, 2021

Change Font Colour in tablepane

Hi Guys,

How can I programmatically change the font colour in column in tablepane, for example to text in a specific column to be red, maybe that could be done in  %OnAfterCreatePage or  OnDrawCell ?

Thanks'

Product version: Ensemble 2014.1

Comments

Guilherme Mendes · Oct 22, 2021

Hi!

I don't know how to change the font colour directly (of that data), but...

You can use OnDrawCell and inside the method get the data and set the style.

Method MyMethod(pTable As %ZEN.Component.tablePane, pName As %String, pSeed As %String) As %Status{    If (pName="colName") {        Set cellData = %query("colName"),            myColor = "red"        &html<            <div style="color:#(myColor)#">            <!-- You can write something, for example: if cellData is a number (of minutes) you could do what's below. -->                #(cellData)# minutes            </div>        >    }    Return $$$OK}

If you do this, that column will not order anymore

0
Nezla  Oct 25, 2021 to Guilherme Mendes

Thanks mate

0