View Full Version : corrupted inputtext
epopov
03-11-2004, 07:41 AM
Hi,
my application has inputtext with variable height and when the text height is large, the bottom part of text is invisible. Attachment contains an example.
Is there a way to fix this bug?
antun
03-11-2004, 10:32 AM
The issue seems to be with the height of the canvas. If the inputtext is taller than the canvas height, then any difference between the two won't show up in the inputtext field.
I tweaked your code to write out how big the inputtext wanted to be, then adjusted the canvas accordingly.
<canvas width="800" height="900" debug="true">
<dataset name="funnyxml" src="a.xml" type="http"
request="false" />
<datapointer xpath="funnyxml:/*">
<method event="ondata">
canvas.singleview.ztxt.setText(this.getNodeText()) ;
</method>
</datapointer>
<button>
Super!!!
<method event="onclick">
canvas.datasets.funnyxml.doRequest();
</method>
</button>
<view y="50" name="singleview" width="400" height="300" clip="true">
<inputtext name="ztxt" multiline="true" width="184"
height="${parent.height*3}" bgcolor="yellow">
<method event="oninit">
Debug.write( this.height );
</method>
</inputtext>
<scrollbar axis="y" />
</view>
</canvas>
Not sure if this is the most practical workaround, but I have filed a bug on this.
-Antun
antun
03-11-2004, 11:29 AM
My apologies; I spoke too soon - this isn't a bug; it's expected behavior. Instead of making the canvas taller, set its maxtextheight attribute to 900px.
maxtextheight:
http://www.laszlosystems.com/lps/docs/lzx-reference/?canvas.html#attr-maxtextheight
-Antun
epopov
03-12-2004, 05:28 AM
This attribute works only for output text field, but doesn't for inputtext.
See example in the attachment.
May be there is some other solution that distincts from changing of the canvas height?
antun
03-12-2004, 08:36 AM
Hmmm you're right. I'm not sure if there is an alternative to changing the canvas height in that case.
-Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.