Alternate background not showing up on Table view form

Hi All

I use an alternate background (Property: rowBGColorCalculation) calculation which works on a List view form, but not on a table view form!?
The code is as follows:

var index = arguments[0];
var selectedRow = arguments[1];
if (selectedRow == true)
{
return “#B5D5FF”;
}
else
{
if (index % 2 == 0) //alternate odd/even
{
return “#EDF3FE”; // light blue
}
else
{
return “#FFFFFF”; // white
}
}

Has anyone a running example of a Table view (locked) alternate background?

Best regards, Robert

That works fine for me. Maybe you use a color directly on the field that overrides this?

Make the elements TRANSPARENT - then it should work.

Hi Bob, Hi Patrick

bcusick:
Make the elements TRANSPARENT - then it should work.

Thanks for the hints. I did the following: Duplicated a form (List view) which works correctly with alternate background (light blue/white) and, also with bg color for the selected record (blue). Then, on the duplicated form, the only thing I changed is setting the property view from List view to Table view (locked). Now, it doesn’t show the alternate background any more! BUT, when unchecking the field property transparent (yes, unchecking, i. e. the field is not transparent) IT WORKS!
That is, in my application at least, in List view I have to have the fields transparent to get the alternate background colors, whereas in Table view (locked) I have to have fields non-transparent to get the alternate background colors. Very strange. Can anyone confirm that behaviour?

Best regards, Robert

yes there is a difference between listview and tableview:

Listview we draw the background of the panel where all the elements are on. And we let the elements be as they where. If they are transparant you see the also that bg color because you see the background panel.

Table we set the background of the components. Because there is no backing background panel. The only thing you see in the tableview are the components and there borders… So in this case you shouldn’t make the transparant because if you do you just see the background color of the table itself. (the complete table)

Hi Johan

jcompagner:
yes there is a difference between listview and tableview:

Listview we draw the background of the panel where all the elements are on. And we let the elements be as they where. If they are transparant you see the also that bg color because you see the background panel.

Table we set the background of the components. Because there is no backing background panel. The only thing you see in the tableview are the components and there borders… So in this case you shouldn’t make the transparant because if you do you just see the background color of the table itself. (the complete table)

Thanks for the explanation, this helps to understand why the behaviour is different on the table and list view, which is from a (developer) user standpoint irritating. But as far as I can read between your lines you are not going to change that, i. e. make the behaviour of the list and table view the same in a future release, are you? (I assume for technical reasons, because you can’t add a backing background panel?)

Beside that I think the table view is very useful and a quick way to display information in a tabular way. Actually, if you would complete the functionality as mentioned below, I don’t see any reasons to use list view (may be there are and I am not aware of .-)

May I suggest two things to make table view fully usable:
Could you highlite the selected column header and display a triangle of the actual sort order of the column (let’s assume as in OS X header becames aqua blue, showing an up or down triangle, depending on the sort order)
allow for left, right or center adjustment of the column header text

Would that be possible in a future release?

Thanks in advance, Robert

PS: Did you already analyze the WooF behaviour?

i can make the listview and tableview a bit better in sync but then it is the other way around so doing the samething on a listview then i do on a tableview: Setting the bgcolor on every element in the listview.
But i don’t think developers will like that. (this would be the same as setting every element to transparant in listview)

Doing something different in a tableview is not realyl possible and you won’t see a thing. because in a tableview you see more or less only the elements.

I still have to look at WooF with maarten. Hopefully we can sqeesh it in by the end of this week.

Hi Johan

jcompagner:
i can make the listview and tableview a bit better in sync but then it is the other way around so doing the samething on a listview then i do on a tableview: Setting the bgcolor on every element in the listview.
But i don’t think developers will like that. (this would be the same as setting every element to transparant in listview)

Doing something different in a tableview is not realyl possible and you won’t see a thing. because in a tableview you see more or less only the elements.

I still have to look at WooF with maarten. Hopefully we can sqeesh it in by the end of this week.

Ok, I leave it (as I have no other possibility .-) up to you what to do. I just wanted to mention that such inconsistent behaviour in a developer tool doesn’t make a developer’s life easier .-)

Best regards, Robert

PS: if you have news according to WooF, I would like to know about (obviously :-)

Same as the original question here – not seeing the answer. Why doesn’t this work in table view (locked) as rowBGColorCalculation:

if (index % 2 == 0) //alternate odd/even
{
return “#EDF3FE”; // light blue
}
else
{
return “#FFFFFF”; // white
}
}

It works incorrectly – some rows are white and some are light blue – not that it doesn’t work AT ALL because i don’t have the fields set to transparent or something… Did anyone come up with a way to do alternating colors per row?

The index is the first argument, so this should work:

function rowBGcolor()
{
	var index = arguments[0];
	
	if (index % 2 == 0) //alternate odd/even
	{
		return "#EDF3FE"; // light blue
	}
	else
	{
		return "#FFFFFF"; // white
	}
}