Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Gary C. on February 05, 2014, 04:48:49 pm



Title: Keeping current row highlighted in display array
Post by: Gary C. on February 05, 2014, 04:48:49 pm
Hi

I am not sure if this is possible but would welcome any advice.

Our apps frequently use a display array to show say order items and then a folder with a series of pages to display further information about the current line, e.g. comments.

When a user selects a line in the item array it is highlighted but when they navigate to one of the folder pages the display array  looses focus and the highlight disappears. On occasion this has caused confusion.

The attached screen shots attempt to show what I am describing.

So, is there a way of keeping a row in a display array highlighted even when focus has moved to another element?

Thanks


Title: Re: Keeping current row highlighted in display array
Post by: Leo S. on February 05, 2014, 05:02:14 pm
Hi Collis,
it seems to me that your :even, :odd pseudo selectors collide with the gray of the selected line .
If a table row is selected and does not have the focus it is made grey. Now with your styles it is hardly to distinguish if the line is an odd line or a selected line. Change your :even,:odd colors to something else (or remove those for testing)  and you be able to differentiate the selected line.
HTH Leo


Title: Re: Keeping current row highlighted in display array
Post by: Gary C. on February 05, 2014, 05:42:12 pm
Hi Leo

You are absolutely correct and removing the odd/even stripes has improved matters no end.

Many thanks - I simply hadn't noticed!

Gary


Title: Re: Keeping current row highlighted in display array
Post by: Bryce S. on February 06, 2014, 09:23:13 pm
Hi Collis,

Another thing we do for this situation is have a specific style we use on the table.

e.g.
table ( HEIGHT = 6,  style="StrongHighlightCurrentRow")

and in our default.4st we have added:
   <!-- StrongHighlightCurrentRow was created for multi dialog - trying to (subtly) highlight
       a row in a display array while another array has focus...  -->
   <Style name="Table.StrongHighlightCurrentRow">
       <StyleAttribute name="highlightCurrentRow" value="1"/>
      <StyleAttribute name="highlightColor" value="#a9d7f2" />
   </Style>   
   <Style name="Table.StrongHighlightCurrentRow:focus">
      <StyleAttribute name="highlightColor" value="highLight" />
   </Style>

Play with that, maybe it will help also.

Regards,
  Bryce Stenberg
  IT Department
  Harness Racing New Zealand Inc.