Naturally I think you could do worse than understand the code in this post from the near past:
The thread is worth time and will place that post in context.
However you do the buttons the way we all want you to, you will have to decide what to do with the edges.
It seems like you are solving a specific problem, perhaps describing it in some detail would let us help better, fun as it is to speculate.
a7