Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Display Array Conditional Formatting  (Read 8888 times)
Gary C.
Posts: 109


« 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

Reuben B.
Four Js
Posts: 1049


« Reply #1 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.


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Gary C.
Posts: 109


« Reply #2 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
Sebastien F.
Four Js
Posts: 509


« Reply #3 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
Reuben B.
Four Js
Posts: 1049


« Reply #4 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

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines