TabbedComponent callback w/o derivation

Is it possible to get some sort of callback from the TabbedComponent without deriving my own class from it? ie. like addListener or addButtonListener?

I have the same controls on all the pages, and instead of having actual copies of the controls on each page, I want to simply update the contents of the controls, that I’ve layed over the tab control, when the user changes which tab is currently displayed.

It’s a good request, will do that when I get chance.

why not using a TabbedButtonBar? and subscribe to it as a ChangeListener?

we do that to avoid instantiation of all tabbed Components even if they are not visible.

however it would be great if it was a built-in feature of TabbedComponent.

I have another related request: separate the tab background colour from the tabs content background colour.

in many cases it makes sense to have a transparent content background but an opaque tab colour.

at the moment we are cheating by using transparent tabs colours but imposing an opaque colour in the LookAndFeel tab drawing code, which is not very elegant IMHO.

I’m sad it seems you never got chance :slight_smile:

Huh? The TabbedButtonBar is a ChangeBroadcaster. And the TabbedComponent has actually changed a lot since this thread was written… If you have a specific problem with what you’re trying to do, feel free to ask about it.