CToggleSwitch
Two-state switch. Space toggles on release; hidden/disabled controls snap to their logical state.
import { CToggleSwitch } from "canvas-toolkit-lib";Declared members
constructor(parent?: CWidget | null);thumbPosition(): number;animationDuration(): number;setAnimationDuration(duration: number): void;Milliseconds for a full transition (0 disables animation).
setText(text: string): void;setFont(font: CFont, _propagate?: boolean): void;sizeHint(): CSize;setEnabled(enabled: boolean): void;protected visibilityChangeEvent(): void;protected focusOutEvent(event: CFocusEvent): void;protected mousePressEvent(event: CMouseEvent): void;protected mouseReleaseEvent(event: CMouseEvent): void;protected mouseEnterEvent(event: CMouseEvent): void;protected mouseLeaveEvent(event: CMouseEvent): void;protected keyPressEvent(event: CKeyEvent): void;protected keyReleaseEvent(event: CKeyEvent): void;protected paintEvent(painter: CPainter): void;destroy(): void;