Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: SSL D. on April 08, 2010, 04:14:00 pm



Title: ComboBox Colours
Post by: SSL D. on April 08, 2010, 04:14:00 pm
Is there a way of displaying the contents of a ComboBox using multiple colours? Something similar to setArrayAttributes. A different colour is required for each item within the listing.

We'd like to list the name of a colour and it be shown as that colour.

Note: Ideally we'd like the BackColour to be changed rather than the font colour.


Title: Re: ComboBox Colours
Post by: Reuben B. on April 12, 2010, 12:10:13 am
Hi Kevin,

I am not aware of a means to apply rich-text attributes to combobox entries.  I would probably consider using a DISPLAY ARRAY comprised of a column of Labels (or TextEdits) with textFormat="html".  So you'd populate the array similar to ...

   LET arr[1].colour = '<div style="background-color:#FF0000">red</div>'
   LET arr[2].colour = '<div style="background-color:#00FF00">green</div>'
   LET arr[3].colour = '<div style="background-color:#0000FF">blue</div>'

... that gives you flexibility for background and foreground colours as well as 65536 colours to choose from.

Reuben

PS I'd also ask Pierre-Nicolas nicely if the colour picker dialog as used in Genero Studio Report Designer is something that could be called in a ui.Interface.frontCall() similar to the openFile,saveFile dialogs etc.


Title: Re: ComboBox Colours
Post by: Sebastien F. on April 22, 2010, 06:17:40 pm
Another option is to use a Table + DISPLAY ARRAY with DIALOG.setArrayAttributes() to color the cells.

https://4js.com/techdocs/genero/fgl/devel/DocRoot/User/ClassDialog.html#setArrayAttributes

Seb