Jan Blok wrote:What we could do is make the listview/tableview/portal look for a calculation called "servoy_row_bgcolor" and if present is called with recordIndex and selected flag.
In which case you could make the servoy_row_bgcolor calc like:
- Code: Select all
var recordIndex = arguments[0]
var selected = arguments[1];
if (selected)
{
return '#CCCCEE';
}
else
{
if (recordIndex % 2 == 0)//alternate on even oneven
{
return '#0000FF';
}
else
{
return '#FF0000';
}
}
Let me know your ideas.
Yes, please, anything that makes Servoy NOT look like FileMaker with the stupid little black box at left as the record indicator. I like the flexibility of being able to specify every other, every three or every n records.
Although it would be preferable if the highlight was just a propery of a form in list view. Being able to set the alternating would be nice as a property as well. Imagine the following...
bodyPartHighlight('#CCCCEE')
bodyPartColor(2,'#FF0000'|'#0000FF')