implements delegate for custom button

example of switching on table row.