Documentation

ListBox
in package

Creation of customized lists

Table of Contents

$Title  : string
$defaultDisabledBackgroundColor  : string
$defaultDisabledForegroundColor  : string
$defaultItemBackgroundColor  : string
$defaultItemForegroundColor  : string
$defaultItemHeaderBackgroundColor  : string
$defaultItemHeaderForegroundColor  : string
$defaultRowHeaderItemDelimiterBackgroundColor  : string
$defaultRowHeaderItemDelimiterForegroundColor  : string
$items  : array<string|int, mixed>
$rowHeaderItemDelimiter  : string
$rowsHeaderType  : string
$titleBackgroundColor  : string
$titleForegroundColor  : string
__construct()  : mixed
Creates new ListBox control
AddItem()  : ListBox
Adds item to ListBox collection
ClearItems()  : ListBox
Clears items
Render()  : void
Builds and renders list
SetRowHeaderItemDelimiter()  : ListBox
Sets delimiter between header and item (for example: ". ")
SetRowHeaderItemDelimiterStyle()  : ListBox
Sets style for delimiter between header and item
SetRowsHeaderType()  : ListBox
Sets header type for items
SetTitleColor()  : ListBox
Set color of title. Use ForegroundColors and BackgroundColors enums

Properties

$Title

public string $Title = ""

Title of box

$defaultDisabledBackgroundColor

protected string $defaultDisabledBackgroundColor = \Data\String\BackgroundColors::AUTO

$defaultDisabledForegroundColor

protected string $defaultDisabledForegroundColor = \Data\String\ForegroundColors::PURPLE

$defaultItemBackgroundColor

protected string $defaultItemBackgroundColor = \Data\String\BackgroundColors::AUTO

$defaultItemForegroundColor

protected string $defaultItemForegroundColor = \Data\String\ForegroundColors::PURPLE

$defaultItemHeaderBackgroundColor

protected string $defaultItemHeaderBackgroundColor = \Data\String\BackgroundColors::AUTO

$defaultItemHeaderForegroundColor

protected string $defaultItemHeaderForegroundColor = \Data\String\ForegroundColors::PURPLE

$defaultRowHeaderItemDelimiterBackgroundColor

protected string $defaultRowHeaderItemDelimiterBackgroundColor = \Data\String\BackgroundColors::AUTO

$defaultRowHeaderItemDelimiterForegroundColor

protected string $defaultRowHeaderItemDelimiterForegroundColor = \Data\String\ForegroundColors::PURPLE

$items

protected array<string|int, mixed> $items = array()

Control items collection

$rowHeaderItemDelimiter

protected string $rowHeaderItemDelimiter = ". "

$rowsHeaderType

protected string $rowsHeaderType = \CliForms\Common\RowHeaderType::NUMERIC

$titleBackgroundColor

protected string $titleBackgroundColor = \Data\String\BackgroundColors::AUTO

$titleForegroundColor

protected string $titleForegroundColor = \Data\String\ForegroundColors::PURPLE

Methods

__construct()

Creates new ListBox control

public __construct(string $title) : mixed
Parameters
$title : string
Return values
mixed

SetRowHeaderItemDelimiter()

Sets delimiter between header and item (for example: ". ")

public SetRowHeaderItemDelimiter(string $delimiter) : ListBox
Parameters
$delimiter : string
Return values
ListBox

SetRowHeaderItemDelimiterStyle()

Sets style for delimiter between header and item

public SetRowHeaderItemDelimiterStyle(string $foregroundColor, string $backgroundColor) : ListBox
Parameters
$foregroundColor : string
$backgroundColor : string
Return values
ListBox

Search results