Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Gary C. on September 02, 2012, 05:09:33 pm



Title: Display Array Conditional Formatting
Post by: Gary C. on September 02, 2012, 05:09:33 pm
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



Title: Re: Display Array Conditional Formatting
Post by: Reuben B. on September 02, 2012, 05:46:58 pm
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.



Title: Re: Display Array Conditional Formatting
Post by: Gary C. 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


Title: Re: Display Array Conditional Formatting
Post by: Sebastien F. on September 03, 2012, 11:07:46 am
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


Title: Re: Display Array Conditional Formatting
Post by: Reuben B. on September 04, 2012, 03:16:26 pm
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