PDA

View Full Version : Tabs in multiple rows


purplehaze
03-26-2004, 12:46 AM
Hi,
I am a newbie in Laszlo. I explored the tabs but couldn't see how can I have tab in Multiple rows.
Everytime I added a tab, it got added in a "single" row.

Is there anyway to have tabs in two rows and below tht the tabpane? Do i need to use a layout for it?

I tried to wrap the tabs to that automatically a second row is formed but that didn't worked either.

Thanks in advance.
-P

thipperudra
03-26-2004, 02:24 AM
Hi,

I think this is solution,

<canvas width="200" height="300">
<include href="lz" />
<simplelayout axis="y"/>
<basetabs x="10" tabclass="tab">
<basetabpane text="one">
<text>one</text>
</basetabpane>
<basetabpane text="two">
<text>two</text>
</basetabpane>
</basetabs>
<basetabs x="10" tabclass="tab">
<basetabpane text="three">
<text>three</text>
</basetabpane>
<basetabpane text="four">
<text>four</text>
</basetabpane>
</basetabs>
</canvas>

-Rudresh

mdavis
03-26-2004, 01:20 PM
The tab component is not designed to lay out in multiple rows. You could extend the basetab class to do what you want, but I would suggest thinking about other inteface machanisms to use in the place of tabs before taking that step.

Perhaps tabsliders, a tree or a list that controlled a second panel...

dcmoore182
02-01-2005, 02:08 PM
<class name="multirowtabsbar" extends="tabsbar"
layout="class: wrappinglayout; axis:'x'; yspacing:-5" width="${canvas.width}" />


Then copy the tab code from Laszlo (name it mytab or something), but change the following function to match this:

<method name="setSelected" args="s">
<![CDATA[
if (s) {
setAttribute('tabstate', 4);
// setAttribute("y", 1);
} else {
setAttribute('tabstate', 2);
// setAttribute("y",0);
}

super.setSelected(s);
]]>
</method>


Then declare your tabs like this...

<tabs width="100%" tabclass="mytab" barclass="multirowtabsbar" >

tsouki
01-24-2006, 03:15 AM
From where, to copy the tab code?

olivier
03-22-2006, 05:33 AM
Hi,

I've tested this solution and it doesn' t work. I obtain a blank row.

Can you explain more the way to implement the new class ?

thanks