Canvas Toolkit
← Class index

CComboBoxItemDelegate

Widgets · extends CAbstractItemDelegate

Item delegate using a combo box with a predefined set of values.

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

Declared members

constructor(items?: readonly string[]);

Creates a combo-box delegate with optional initial items.

items(): readonly string[];

Returns a copy of the available items.

setItems(items: readonly string[]): void;

Replaces all available items.

addItem(text: string): void;

Adds an available item.

isEditable(): boolean;

Returns whether editors accept arbitrary text.

setEditable(editable: boolean): void;

Sets whether editors accept arbitrary text.

createEditor(parent: CWidget, _index: CModelIndex): CWidget;
setEditorData(editor: CWidget, index: CModelIndex): void;
editorShown(editor: CWidget, _index: CModelIndex): void;
setModelData(editor: CWidget, model: CAbstractItemModel, index: CModelIndex): void;