Radiobutton
extends Checkbox
in package
Creates radiobutton for MenuBox.
You should use "GroupName" method to group your radiobuttons. All radiobuttons of one group have to have the same group name.
Table of Contents
- $Checked : bool
- $DelimiterBackgroundColor : string
- $DelimiterDisabledBackgroundColor : string
- $DelimiterDisabledForegroundColor : string
- $DelimiterForegroundColor : string
- $DelimiterSelectedBackgroundColor : string
- $DelimiterSelectedDisabledBackgroundColor : string
- $DelimiterSelectedDisabledForegroundColor : string
- $DelimiterSelectedForegroundColor : string
- $Disabled : bool
- $DisabledBackgroundColor : string
- $DisabledForegroundColor : string
- $GroupName : string
- $HeaderBackgroundColor : string
- $HeaderDisabledBackgroundColor : string
- $HeaderDisabledForegroundColor : string
- $HeaderForegroundColor : string
- $HeaderSelectedBackgroundColor : string
- $HeaderSelectedDisabledBackgroundColor : string
- $HeaderSelectedDisabledForegroundColor : string
- $HeaderSelectedForegroundColor : string
- $Hint : string
- $HintBackgroundColor : string
- $HintForegroundColor : string
- $IconForegroundColor : string
- $Id : string
- $ItemBackgroundColor : string
- $ItemDisabledBackgroundColor : string
- $ItemDisabledForegroundColor : string
- $ItemForegroundColor : string
- $ItemSelectedBackgroundColor : string
- $ItemSelectedDisabledBackgroundColor : string
- $ItemSelectedDisabledForegroundColor : string
- $ItemSelectedForegroundColor : string
- $Name : string
- $Ordering : int
- $Selectable : bool
- $Visible : bool
- __construct() : mixed
- GetMenuBox() : MenuBox|null
- Remove() : void
- Removes element from current MenuBox
- Render() : string
- SetDelimiterStyle() : ListBoxItem
- Set style for delimiter between header and item
- SetHeaderStyle() : ListBoxItem
- Set header style
- SetItemStyle() : ControlItem
- Set style for item
- SetOnSelect() : MenuBoxItem
- Sets callback when item selected
Properties
$Checked
public
bool
$Checked
= false
Is radiobutton checked. If set to TRUE, another selected radiobutton from this group will automatically be set to FALSE
$DelimiterBackgroundColor
public
string
$DelimiterBackgroundColor
= \Data\String\BackgroundColors::AUTO
$DelimiterDisabledBackgroundColor
public
string
$DelimiterDisabledBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$DelimiterDisabledForegroundColor
public
string
$DelimiterDisabledForegroundColor
= \Data\String\ForegroundColors::GRAY
$DelimiterForegroundColor
public
string
$DelimiterForegroundColor
= \Data\String\ForegroundColors::AUTO
$DelimiterSelectedBackgroundColor
public
string
$DelimiterSelectedBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$DelimiterSelectedDisabledBackgroundColor
public
string
$DelimiterSelectedDisabledBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$DelimiterSelectedDisabledForegroundColor
public
string
$DelimiterSelectedDisabledForegroundColor
= \Data\String\ForegroundColors::GRAY
$DelimiterSelectedForegroundColor
public
string
$DelimiterSelectedForegroundColor
= \Data\String\ForegroundColors::GRAY
$Disabled
public
bool
$Disabled
= false
Is item disabled
$DisabledBackgroundColor
public
string
$DisabledBackgroundColor
= \Data\String\BackgroundColors::AUTO
Text's background color when item disabled
$DisabledForegroundColor
public
string
$DisabledForegroundColor
= \Data\String\ForegroundColors::AUTO
Text's color when item disabled
$GroupName
public
string
$GroupName
= ""
Group name of the radiobutton
$HeaderBackgroundColor
public
string
$HeaderBackgroundColor
= \Data\String\BackgroundColors::AUTO
$HeaderDisabledBackgroundColor
public
string
$HeaderDisabledBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$HeaderDisabledForegroundColor
public
string
$HeaderDisabledForegroundColor
= \Data\String\ForegroundColors::GRAY
$HeaderForegroundColor
public
string
$HeaderForegroundColor
= \Data\String\ForegroundColors::AUTO
$HeaderSelectedBackgroundColor
public
string
$HeaderSelectedBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$HeaderSelectedDisabledBackgroundColor
public
string
$HeaderSelectedDisabledBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$HeaderSelectedDisabledForegroundColor
public
string
$HeaderSelectedDisabledForegroundColor
= \Data\String\ForegroundColors::GRAY
$HeaderSelectedForegroundColor
public
string
$HeaderSelectedForegroundColor
= \Data\String\ForegroundColors::GRAY
$Hint
public
string
$Hint
= ""
Item's hint. Display when item is selected
$HintBackgroundColor
public
string
$HintBackgroundColor
= \Data\String\BackgroundColors::AUTO
Hint background color
$HintForegroundColor
public
string
$HintForegroundColor
= \Data\String\ForegroundColors::DARK_RED
Hint foreground color
$IconForegroundColor
public
string
$IconForegroundColor
= \Data\String\ForegroundColors::BLUE
$Id
public
string
$Id
= ""
Any value here. ID is not using anywhere except your code
$ItemBackgroundColor
public
string
$ItemBackgroundColor
= \Data\String\BackgroundColors::AUTO
Text's background color
$ItemDisabledBackgroundColor
public
string
$ItemDisabledBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$ItemDisabledForegroundColor
public
string
$ItemDisabledForegroundColor
= \Data\String\ForegroundColors::GRAY
$ItemForegroundColor
public
string
$ItemForegroundColor
= \Data\String\ForegroundColors::AUTO
Text's color
$ItemSelectedBackgroundColor
public
string
$ItemSelectedBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$ItemSelectedDisabledBackgroundColor
public
string
$ItemSelectedDisabledBackgroundColor
= \Data\String\BackgroundColors::YELLOW
$ItemSelectedDisabledForegroundColor
public
string
$ItemSelectedDisabledForegroundColor
= \Data\String\ForegroundColors::GRAY
$ItemSelectedForegroundColor
public
string
$ItemSelectedForegroundColor
= \Data\String\ForegroundColors::GRAY
$Name
public
string
$Name
= ""
Item's title
$Ordering
public
int
$Ordering
= 1
Item's ordering
$Selectable
public
bool
$Selectable
= true
Is item visible and allowed to be selected
$Visible
public
bool
$Visible
= true
Is item visible
Methods
__construct()
public
__construct([string $name = "" ]) : mixed
Parameters
- $name : string = ""
Return values
mixed —GetMenuBox()
public
GetMenuBox() : MenuBox|null
Return values
MenuBox|null —Returns MenuBox that this item is in
Remove()
Removes element from current MenuBox
public
Remove() : void
Return values
void —Render()
public
Render() : string
Return values
string —Rendered item
SetDelimiterStyle()
Set style for delimiter between header and item
public
SetDelimiterStyle(ForegroundColors $foregroundColor[, BackgroundColors $backgroundColor = BackgroundColors::AUTO ]) : ListBoxItem
Parameters
- $foregroundColor : ForegroundColors
- $backgroundColor : BackgroundColors = BackgroundColors::AUTO
Return values
ListBoxItem —SetHeaderStyle()
Set header style
public
SetHeaderStyle(ForegroundColors $foregroundColor[, BackgroundColors $backgroundColor = BackgroundColors::AUTO ]) : ListBoxItem
Parameters
- $foregroundColor : ForegroundColors
- $backgroundColor : BackgroundColors = BackgroundColors::AUTO
Return values
ListBoxItem —SetItemStyle()
Set style for item
public
SetItemStyle(ForegroundColors $foregroundColor[, BackgroundColors $backgroundColor = BackgroundColors::AUTO ]) : ControlItem
Parameters
- $foregroundColor : ForegroundColors
- $backgroundColor : BackgroundColors = BackgroundColors::AUTO
Return values
ControlItem —SetOnSelect()
Sets callback when item selected
public
SetOnSelect(callable $callback) : MenuBoxItem
Parameters
- $callback : callable