Canvas Toolkit
← Class index

CStackedWidget

Widgets · extends CFrame

Implements the stacked widget widget.

import { CStackedWidget } from "canvas-toolkit-lib";

Declared members

readonly currentChanged: CSignal<[number]>;

Signal emitted when current changes.

constructor(parent?: CWidget | null);

Creates a new instance.

addWidget(widget: CWidget): number;

Adds widget.

insertWidget(index: number, widget: CWidget): number;

Inserts widget.

removeWidget(index: number): CWidget | null;

Removes widget.

count(): number;

Provides count behavior.

currentIndex(): number;

Returns the current index.

currentWidget(): CWidget | null;

Returns the current widget.

indexOf(widget: CWidget): number;

Provides index of behavior.

widget(index: number): CWidget | null;

Provides widget behavior.

setCurrentIndex(index: number): void;

Sets the current index.

setCurrentWidget(widget: CWidget): void;

Sets the current widget.

setGeometry(x: number, y: number, width: number, height: number): void;

Sets the geometry.