Is there a way to tie width of a frame to width (in pixels) of a text? To make the frame size dependable on the text length.
Yes, frame is designed to take the size of the displayable it contains unless that functionality is not overwritten by providing a size to it. There are many example of that in the game, girlsmeets are one such an example (I think), we are using a frame that takes the size that is just slightly larger than the gm image. There is not much difference between Text and Images internally where frames are involved.
So basically, the answer is yes, if you do not provide a size to a frame, it should take the size of the text. padding (mostly padding I think) and margin style properties of the frame will determine how much larger the frame will be than the text.
PS: You can try this stuff on a fresh project so there is no bloat and it runs really fast.
==>
Cleaning will require a bit more luv and I'll be busy for the better part of today, so while I am typing in new code whenever I can, chances that it'll be finished and debugged today are slim.