Added the text_box.on_text_changed-event.
Moved the code to add an event handler to a control to a separate function.
Fixed a bug where setting the width of a text box also increased the height and vice versa.