viraf
12-12-2004, 10:52 AM
Hi,
I am learning Laszlo and had a couple of questions. I am enclosing the sample that I am using for this question.
The "main" view displays the position, { label, desc } and temp. Due to space constraints I rotated the {label, desc } items. As per document I used "
I would have expected to adjust the "yoffset" not the "xoffset" as I did to get the desired behaviour. Could someone please explain.
The location of the temperature is in correct - it should be below the {label, desc}. Why is it where it?
Why is the "main" view's width wider than the text?
How can I have position and temp centered ?
Thanks.
- viraf
<canvas width="600" height="600">
<dataset name="weather">
<forecast>
<day label="TODAY" desc="Windy" temp="Hi 52°F "/>
<day label="TONIGHT" desc="Mostly Clear" temp="Lo 30°F "/>
<day label="SATURDAY" desc="Partly Cloudy" temp="Hi 42°F "/>
<day label="SATURDAY" desc="Partly Cloudy" temp="Lo 38°F "/>
<day label="SUNDAY" desc="Mostly Sunny" temp="Hi 52°F "/>
<day label="SUNDAY" desc="Partly Cloudy" temp="Lo 42°F "/>
<day label="MONDAY" desc="Rain Likely" temp="Hi 52°F "/>
<day label="MONDAY" desc="Chance Rain" temp="Lo 48°F "/>
<day label="TUESDAY" desc="Chance Showers" temp="Hi 58°F "/>
</forecast>
</dataset>
<simplelayout axis="x" spacing="3" />
<view name="main" datapath="weather:/forecast/day">
<simplelayout axis="y" spacing="3" />
<text datapath="position()" />
<view bgcolor="blue" rotation="-90">
<simplelayout axis="y"/>
<text datapath="@label" />
<text datapath="@desc" />
<attribute name="xoffset" value="${this.width}" />
</view>
<text datapath="@temp" />
</view>
</canvas>
I am learning Laszlo and had a couple of questions. I am enclosing the sample that I am using for this question.
The "main" view displays the position, { label, desc } and temp. Due to space constraints I rotated the {label, desc } items. As per document I used "
I would have expected to adjust the "yoffset" not the "xoffset" as I did to get the desired behaviour. Could someone please explain.
The location of the temperature is in correct - it should be below the {label, desc}. Why is it where it?
Why is the "main" view's width wider than the text?
How can I have position and temp centered ?
Thanks.
- viraf
<canvas width="600" height="600">
<dataset name="weather">
<forecast>
<day label="TODAY" desc="Windy" temp="Hi 52°F "/>
<day label="TONIGHT" desc="Mostly Clear" temp="Lo 30°F "/>
<day label="SATURDAY" desc="Partly Cloudy" temp="Hi 42°F "/>
<day label="SATURDAY" desc="Partly Cloudy" temp="Lo 38°F "/>
<day label="SUNDAY" desc="Mostly Sunny" temp="Hi 52°F "/>
<day label="SUNDAY" desc="Partly Cloudy" temp="Lo 42°F "/>
<day label="MONDAY" desc="Rain Likely" temp="Hi 52°F "/>
<day label="MONDAY" desc="Chance Rain" temp="Lo 48°F "/>
<day label="TUESDAY" desc="Chance Showers" temp="Hi 58°F "/>
</forecast>
</dataset>
<simplelayout axis="x" spacing="3" />
<view name="main" datapath="weather:/forecast/day">
<simplelayout axis="y" spacing="3" />
<text datapath="position()" />
<view bgcolor="blue" rotation="-90">
<simplelayout axis="y"/>
<text datapath="@label" />
<text datapath="@desc" />
<attribute name="xoffset" value="${this.width}" />
</view>
<text datapath="@temp" />
</view>
</canvas>