You need to include the simplelayout.lzx definition, if you don't use
that tag somewhere else in your code. Check the developer guide, and
you should find that information there.

Then, when setting the layout property on a view, the argument should
be a JavaScript object containing the layout definition instead of an
instance of lz.simplelayout. Here's a working example:

<canvas width="100%" height="100%">

    <include href="utils/layouts/simplelayout.lzx"/>

    <view>
        <handler name="oninit">
            this.setAttribute('layout',
                   { class : 'simplelayout',
                     axis : 'x',
                     spacing : 10 });
        </handler>
        <text>one</text>
        <text>two</text>
    </view>
</canvas>

One advice: Questions like this one should be sent to the laszlo-user
mailing list, since these are just questions regarding your custom
code, and not the platform development.

- Raju

Reply via email to