TabbedViewTab:
Filter:
TabbedView2/Classes (extension) | GUI > Views

TabbedViewTab
ExtensionExtension

A Tab held by a TabbedView2

Description

WARNING: You never instantiate a TabbedViewTab directly, but rather use TabbedView2.add to add it to the parent view and get a reference to the tab. However, once you have the reference, you can use it like a CompositeView or a ScrollView, plus you can configure all kinds of options, and override TabbedView2 defaults.

Version and Author

version: 1.05 , Oct 28, 2016 author: Jost Muxfeldt

Class Methods

NOTE: Instantiate by using

TabbedView2: -add

or

TabbedView2: -insert

Instance Methods

Properties

NOTE: You must call .refresh on the parent tabbedView2 for changes to be visible.

.widget

Returns:

the UserView which draws the widget

.label

The tab label text

.index

returns the index of this tab

Actions

.focus

focus this tab

.remove

delete this tab from parent

.onRemove

a Function to be performed on remove: {arg thisView; do stuff }

.onChangeParent

a Function to be performed right before detach or on dragging to another view: {arg thisView; do stuff...}.

.onAfterChangeParent

a Function to be performed right after detach or on dragging to another view: {arg thisView; do stuff...}.

Customize Colors

NOTE: These methods override the defaults in TabbedView2.

See TabbedView2: Setting Colors

You must call .refresh on the parent tabbedView2 for changes to be visible.

.labelColor

.unfocusedColor

.stringColor

.stringFocusedColor

.background

Customize Appearance

.useDetachIcon

boolean. default false. Add an icon for detaching the view ( Qt GUI only)

.tabWidth

set with \auto or and integer

.userDrawFunction

adds your function to the user draw function. Add an icon if something is happening in the tab, for example

Customize Behavior

.rightClickDetach

Boolean or Function: {arg thisView; return boolean}. to disable:set to false

.closable

Boolean or Function: {arg thisView; return boolean}- add a close icon by setting this to true. If tabWidth is \auto, the width will adjust automatically, but you might have to play with TabbedView2's labelPadding, depending on other settings, like the TabbedView2's Font, or tabHeight, etc.

.focusAction

add a focus action to the tab. For example enable a scope you are showing in the tab.

.unfocusAction

add an unfocus action to the tab. For example disable a scope you were showing in the tab.

.homeView

The TabbedView2 instance to which a detached TabbedViewTab instance will return if its enclosing window is closed. This defaults to the TabbedView2 instnace which created the TabbedViewTab instance (using add).

Examples

See TabbedView2: EXAMPLES