Hi
I am not sure if this is achievable and so thought I would ask before spending any more time on it.
Is it possible to format the rows of a display array depending upon a condition. In essence I want to replicate the functionality of many email clients that show unread messages in bold.
I know there is the DISPLAY TO method with the attribute bold option but I cannot see how this would work when the array is scrollable (how can I tell if the user has scolled the array) and its container is resizeable (how can I tell if more or less rows are now being displayed).
Anyway, I would be interested to hear if any others have managed to achieve this.
Gary
Its not a pretty solution but have a look at https://4js.com/online_documentation/fjs-fgl-manual-html/User/ClassDialog.html#setting TTY Attributes. I'm pretty sure bold, dim is a valid value you can use as well as what is listed in the documentation there.
Hi Reuben
Thanks for the quick reply. I missed that in the documentation.
It works but bold does not seem to be supported so I have settled on changing the font colour to highlight the unread messages.
Gary
I would use colors instead with DISPLAY ARRAY cell attributes by using ui.Dialog.setArrayAttributes():
https://4js.com/techdocs/genero/fgl/devel/DocRoot/User/MultipleDialogs.html#cell-attributes
This way you can easily set a specific color to any rows, by using a secondary array.
For now you have to put the attributes for each column.
We think of simplifying this when a unique color is needed for the whole row (ref bz#18837)
Don't forget to use UNBUFFERED dialog mode to keep the display synchronized with the array models.
Seb
Quote from: Collis Gary on September 03, 2012, 09:38:27 AM
Hi Reuben
Thanks for the quick reply. I missed that in the documentation.
It works but bold does not seem to be supported so I have settled on changing the font colour to highlight the unread messages.
Gary
Sorry, yes, my recollection of bold was from a conversation with the developer suggesting that bold/dim should be in the list of parameters for this method. There is an issue in the system, Bz#7807 to use styles for this method