TabbedPaneScope
The receiver of a TabbedPane's content, through which a child declares the tab it is the page of.
A pane offers one region, the tab, and tab is the call that fills it. Every child of a pane is one tab's body and names that region on its own modifier; a child that names none is refused as it arrives, since a pane reaches its pages through insertTab and has no indexed children to add it to. The region holds as many children as the content declares, each its own tab, in the order they are emitted:
TabbedPane(selectedIndex = sel, onSelectedIndexChange = { sel = it }) {
Column(SwingModifier.tab("General")) { GeneralSettings() }
Column(SwingModifier.tab("Advanced", enabled = false)) { AdvancedSettings() }
}Content copied to clipboard
See also
Functions
Link copied to clipboard
abstract fun SwingModifier.tab(title: @Nls String, icon: Icon? = null, tooltip: @Nls String? = null, enabled: Boolean = true, mnemonic: Int = NO_MNEMONIC, displayedMnemonicIndex: Int? = null, background: Color? = null, foreground: Color? = null, header: @Composable () -> Unit? = null): SwingModifier
Makes the child the body of a tab titled title, at the position it is emitted in.