PDA

View Full Version : scrollbar problems with <edittext>/<scrollededittext>


kmeixner
11-18-2008, 10:31 AM
Hi,

I am developing and application currently compiled to OpenLaszlo 3.4.0 SWF8 format.

I am having great difficulty creating text areas that have properly functioning scrollbars. After reading a forum post recommending using the incubator class <scrolledittext> class instead of a standard <edittext> class with the standard scrollbar functionality (since "edittext" resizing is broken, at least in version 3.4.0) I managed to get the input text areas to work as desired.

However, I am now having a problem on my report form that reads the values into text areas from a dataset. If I use <edittext text="$path{'@mytext'}" /> the text is loaded into the text area, but of course there are no scrollbars. But when I change this to <scrolledittext text="$path{'@mytext'}" /> I get an empty text area with an empty scrollbar although I would expect to get the text in the text area with active scrollbars.

Does anyone know how to set the text of a <scrolledittext> object to a value read from a dataset? Or does anyone know how to get a regular <edittext> to work properly with scrollbars in version 3.4.0?

Thanks,

Kevin

kmeixner
11-18-2008, 10:58 AM
Okay, nevermind, I managed to figure out a way to get it to work:


<attribute name="txtdescription" type="string" value="$path{'@description'}" />

<handler name="ontxtdescription" args="strDesc">
this.chkDescription.inp.setText(strDesc);
</handler>

<scrolledittext name="chkDescription"
width="370"
height="100"
maxlength="4096"
multiline="true"
>
</scrolledittext>

I moved the text value outside into an external attribute and then added a handler to catch the value getting set and then call the internal "inp" view's setText() method to update the value.

Kevin