Great!
Yep, I fully expected that. You’ll need to update the width from the graph just before the first letter is typed in (the initialize function), and you’ll need to detect the expected size of the text field before hand. I’ve tried to solve this one myself, but had to drop it because I ran out of time. The problem is that the desired size isn’t being reported accurately and it leaves ugly spaces:
That will get you to the ugly spaces (at least in 4.9), but using the WidgetReflector (Window->Developer Tools->Widget Reflector) I can see that the desired size reported is not the same as the desired size in the reflector