|
I'm a little baffled here trying to create a simple
<inputtext> that resizes as the user changes the text. Developers Guide Chapter 21 section 4.4 says the following.... "Setting the resize
attribute on a text field will cause it to be resized to fit its text
content at runtime, whenever the setText() method is called."So if I set resize="true", and the user types text into the element during runtime, the element size does not automatically resize. Am I misunderstanding, or is that somewhat not-useful? What is the point of the resize function then? So what then is the recommended way to make the <inputtext> auto resize with user-entered text? Here's my attempt: <inputtext name="text1" resize="true" align="center" valign="middle" multiline="false" fontsize="14" enter text here" );" > <handler name="ontext"> this.setAttribute( 'text', this.text ); Debug.write( "got ontext, text is now " + this.text + ", width=" + this.width ); </handler> </inputtext> On a guess, I tried using the "ontext" event (which is listed without description in the docs). That does trigger an event on any change to the text, but for some reason the width does not automatically resize, although the debug output does show the changed text after each keypress. However, I can do the exact same setAttribute from the debug console while the element still has focus, and it works as expected, resizes just fine, width changes automatically. ??? If I might comment, it is these kind of "it should just work, but doesn't" quirks that really throw me for a loop with OL. It seems like I run into these too often. Is it just me? I usually have to sit here with the debugger and experiment until I find just the right combination to get something to work. And then sometimes, like the example above, it works differently in runtime than it does in the debugger!! It gets really frustrating. Thanks in advance for any advice.... |
- [Laszlo-user] "resize" attribute of <inputtex... m . laszlo-user
- Re: [Laszlo-user] "resize" attribute of <... Henry Minsky
- Re: [Laszlo-user] "resize" attribute of... m . laszlo-user
- Re: [Laszlo-user] "resize" attribut... m . laszlo-user
- Re: [Laszlo-user] "resize" attribut... Henry Minsky
- Re: [Laszlo-user] "resize" attr... P T Withington
