I believe that then you click on any of the tabelements in a tabslider, all
the tabs recieve the onselected event so you have to check this.selected
before taking action...
<tabelement>
<method event="onselected">
<![CDATA[
if (this.selected) {
// only do stuff when there's an onselected
// event and I'm the guy who was selected
}
]]>
</method>
</tabelement>
Also, as you say, it appears that there are two selected events, one for the
tab being selected, and one for the tab losing selection.
As for closing tabs, you might want to experiment with...
tabelement_instance.setAttribute('selected', false);
...I don't know if it will work or not but it's worth a shot.
-----Original Message-----
From: Stefano Caselli [mailto:[EMAIL PROTECTED]
Sent: Friday, May 19, 2006 10:57 AM
To: William Krick
Subject: Re: [Laszlo-user] closing an opened tabslider
William Krick ha scritto:
> You can always extend OpenLaszlo components to do anything you want.
>
I know, but since I'm a beginner I was hoping to find some pre-made
code, or at least some pseudo-code.
I've already extended tabelement to skip the first "onselect"
event, which I don't need, but it has taken a week of work!
(why after a click on a slider I get two select events ? one for the
already opened tab that is going to be closed, and one for the new
opened slider?).
And I've already tried extending it using close() but the sliders
become start disappearing... not good.
> But you should think of them as a fancy version of the tab control in
> windows.
>
> When you click on an already open tab, do you expect anything to happen?
>
>
I don't expect anything, but then why the tabslider can start for the
first time with all the sliders closed ?
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user