Method: Wads::TextField#width
- Defined in:
- lib/wads/textinput.rb
#width ⇒ Object
This text field grows with the text that’s being entered. (Usually one would use clip_to and scroll around on the text field.)
65 66 67 68 69 70 71 |
# File 'lib/wads/textinput.rb', line 65 def width text_width = @font.text_width(self.text) if text_width > @default_width return text_width end @default_width end |