custom toggle buttons

how can I make my own toggle buttons that work. I made some, but they get stretched out. they dont behave like the default one.

When you say they get stretched out, do you mean they get visual resized incorrectly? Perhaps you could post the code you are using and give a bit more detail about what is going wrong with the buttons.