PDA

View Full Version : Events for TabElements / TabSliders


bclover
04-26-2004, 09:12 AM
I've tried several coding approaches (unsuccessfully) for detecting when a user clicks on a tab in a tabslider component.

I'd basically like to add a sound effect for the opening and closing of tabs.

Can someone point me in the right direction? Is it possible? Am I overlooking something?

Also, in general, I think a better explanation of how to handle events is in order. Is the process for handling inherited events the same as handling the native events of an object?

After seeing a bit on delegates in the LZX Reference, I was wondering if a more thorough example and explanation could be provided.

--BC

antun
04-26-2004, 03:46 PM
Tabelement does fire the onselect event and you should be able to use that to create the effect you would like. Onclick apparently is not meant to be used with tabelement, unless you're trying to overwrite the default behavior (although it didn't overwrite it when I tried it).

-Antun

bclover
04-26-2004, 09:06 PM
Antun,

Thanks...I wasn't aware of the onSelect method...

It worked like a charm!

Thanks!

-BC