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
Discussion (2)1
Comments
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
Thanks mate