[FMX]text field, onSetFocus and onKillFocus

I’m making a form and i want to set a backgroundColor for the textfields onSetFocus and that the backgroundColors dissapear again onKillFocus. So far I have this code

naam.onSetFocus = function(){
 this.background = true;
 this.backgroundColor = 0xdddddd;
}
mail.onSetFocus = function(){
 this.background = true;
 this.backgroundColor = 0xdddddd;
} 
naam.onKillFocus = function() {
 naam.background = false
};
mail.onKillFocus = function() {
 mail.background = false;
};

but to me it seems that there must be a way to combine all this lines of code into one single function or at least two one for the setFocus and one for the killFocus.

Somebody who know how to this?