Highligting Current Record

Is there a way we can hightlight the current record when it’s selected? (see attached pic)

It would be a nice to have such a property for the forms (in list view). Currently servoy highlights the current record in the table view. But it would be nice to have similar and also ability to use any color in the list view

Any suggestions

Thanks
Ahmad
Hong Kong

A listview shows the current record selection if the vertical lines property is enabled, and current editing record is highlighted in tableview when selected.
Highlighting is handeled by the (OS) Look And Feel… is not in our control

Cannot seem to find the “vertical lines property” for listview… Should there be one???

Paul

sorry, mend portal

:D OK, thought I was going nuts trying to find it…

About listview highlightings: any option there instead of the little black thing on the left side of the selected records?

Paul

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:

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.

I like this idea!

I have a bit of trouble grasping the concept, but it looks like this is providing my needs exactly!

Tnx,

Paul

Jan Blok:
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:

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’)

Hi can any one explain this technique step by step?

How to pass the arguements??

Do we need to place any object in the list body or

do we need to place the calc field servoy_row_bgcolor throughout the list body??

I like the idea of matt to make this function as a propery of a form in list view and also in portal

Thanks
Ahmad

I agree with Matt!

Property whould be possible but, if you want to mark a specific records because it holds very important information you could do so with my proposed method and not with a form property…

var index = arguments[0] 
var selected = arguments[1]; 
if (myimportantData == 1)
{
	return '#FF0000' //mark red, is overruling the selected also!
}
else
{
	if (selected) 
	{ 
	   return '#CCCCEE'; 
	} 
	else 
	{ 
	   if (index % 2 == 0)//alternate on even oneven 
	   { 
	      return '#0000FF'; 
	   } 
	   else 
	   { 
	      return '#00FF00'; 
	   } 
	}
}

Let us know your thoughts.

My vote is to go with Jan’s programmed method.

The possibility of highlighting specific records in the list would be a great feature.


Graham Greensall
Worxinfo Ltd

Jan, can you make both possible? :lol:

HJK:
Jan, can you make both possible? :lol:

Well yes, both is possible, but we prefer to build one and save some resources for other things which are on the planning.
Since the calculation suggestion is the most powerfull, we prefer that one.

Since the calculation suggestion is the most powerfull, we prefer that one.

Let’s go for the powerful one.. Hope there won’t be any performance issue under networked solutions with huge records

ahmad:
Hope there won’t be any performance issue under networked solutions with huge records

There will be none, the calc is only be executed for visible records.

Will this be implemented in RC5?

yes

Hi there,

I am unsure how to do highlighting records. A method is called during “onRecordSelection” event or what? Can someone explain the process?

Thanks
Hameed