TabbedComponent issue!


Hi, I have an application that uses a TabbedComponent. I want to display different sliders, buttons etc for each tab but there doesn’t seem to be a function that is called when one of the tabs is clicked. I’ve thought about doing a repaint() or using the timer() function but they are not really what I’m looking for. I’m looking for something along the lines of buttonClicked() but for tabs! Any help appreciated



There are loads of ways to do that! currentTabChanged() is one way. Or get the TabbedButtonBar object and add a listener to it, or use a custom TabbedButtonBar and override its currentTabChanged(). Or use your component’s visibilityChanged() callback. There are probably other ways too!