Text alignment for buttons

If I draw a button that’s aligned to the right of a screen or the right of its parent container, when I edit the text of that button, the button grows to the right. This forces me to realign it. Whereas if the text inside could be aligned left right or center, the button could grow in the opposite direction. I wouldnt have to reposition the button after changing text.