This is a chunk of code to set the text of a text box to align right if it exceeds the length of the text box.

Note: These bits of code are mostly for my own reference, but if anyone else finds them useful all the better.