PDA

View Full Version : XML text is cut off


sacal
04-29-2004, 11:59 AM
XML text is cut off

Hello all, I have just started playing around with Laszo, and it pretty cool! Too bad it doesn’t support Unicode yet, but it’s good to know it’s in the works.

I have a question, I am importing text from and Access generated XML document, and the loading works just fine. My problem is the way it’s displaying it! It’s cutting off the second column, it only displays about 20 characters then it cuts off, some even in the middle of the letter! It looks to me like an view or text width issues.

I tried setting the width of the table element, the view, the text, one at a time, different combinations and nothing!

What am I missing??

Thanks!
Sacal
_______________________________________

<canvas width="1000" height="710" bgcolor="#333333" debug="false">

<dataset name="dst_tipo" src="tb_tipo.xml"/>

<greenstyle name="specialstyle" />

<class extends="dragstate" name="fadeDragger" pooling="true">
<method event="onapply">
parent.bringToFront();
parent.setAttribute('opacity',.3)
</method>

<method event="onremove">
parent.setAttribute('opacity',1)
</method>

<!-- Shadow below element -->
<view name="hShadow" x="10" y="${parent.body.height}"
width="${parent.body.width}" height="10"
opacity=".2" bgcolor="black"/>

<!-- Shadow to the right of element -->
<view name="vShadow" x="${parent.body.width}" y="10"
width="10" height="${parent.body.height - 10}"
opacity=".2" bgcolor="black"/>
</class>


<!-- WINDOW 1 -->
<window name="ONE" title=".:: Window 1 ::." x="10" y="10"
width="300" height="200" resizable="true" opacity="1"
onmousedown="myFadeDragger.apply()"
onmouseup="myFadeDragger.remove()">
<fadeDragger name="myFadeDragger"/>

<tabslider x="0" y="0" width="${parent.width}" height="${parent.height - 44}" spacing="0"
slideduration="300" style="$once{specialstyle}" >
<tabelement text="Tabelement One" width="${parent.width}">

<simplelayout axis="y"/>
<view x="5" width="3000" name="tipos" datapath="dst_tipo:/dataroot/tb_tipo">
<simplelayout axis="x"/>
<text fontstyle="bold" datapath="tipo_id/text()"/>
<!-- ____HERE'S MY PROBLEM_________THIS IS THE TEXT THAT SHOWS CUT OFF -->
<text datapath="tipo_nome/text()"/>
</view>

</tabelement >
<tabelement text="Tabelement Two" />
<tabelement text="Tabelement Three" />
</tabslider>

</window>



<!-- WINDOW 2 -->
<window name="TWO" title=".:: Window 2 ::." x="400" y="10"
width="300" height="200" resizable="true" opacity="1"
onmousedown="myFadeDragger.apply()"
onmouseup="myFadeDragger.remove()">
<fadeDragger name="myFadeDragger"/>
<text>window TWO.</text>
</window>



</canvas>

antun
04-30-2004, 08:41 AM
I wasn't able to run your example because I don't have the XML file associated with your app. However I'm guessing the reason your text is cut off is because of this:


<text datapath="tipo_nome/text()"/>


Text fields don't resize automatically unless you set the resize="true" attribute.

Alternatively, give the text field an explicit width (e.g. width="300").

-Antun