📜CMenuComboBox
CMenuComboBox metatable.
:Name(): string
string
Returns widget's name.
:Update(items: string[]
, defaultValue [?]
: integer
): nil
string[]
, defaultValue [?]
: integer
): nil
Name | Type | Description |
---|---|---|
items |
| |
defaultValue |
| Index of default item. (starts from 0) |
Update the combo box values.
Returns widget's parent.
:Type(): Enum.WidgetType
Enum.WidgetType
Returns widget type.
:Open(): nil
nil
Opens parent tabs.
:ForceLocalization(newText: string
): nil
string
): nil
Not recommended for use due to its complexity
Name | Type | Description |
---|---|---|
newText |
|
Changes text in the widget. The path to the widget is not affected. May be used for dynamic text customization or recolor.
:ToolTip(newText: string
): string
string
): string
Name | Type | Description |
---|---|---|
newText |
|
Gets or sets tooltip. Tooltip is displayed when mouse cursor is over the widget. Depends on the argument.
:ToolTip(): string
string
:Visible(value: boolean
): nil
boolean
): nil
Name | Type | Description |
---|---|---|
value |
|
Gets or sets visible state. Depends on argument.
Example
:Visible(): boolean
boolean
Example
:Disabled(value: boolean
): nil
boolean
): nil
Name | Type | Description |
---|---|---|
value |
|
Gets or sets disabled state. Depends on argument.
Example
:Disabled(): boolean
boolean
Example
:Unsafe(value: boolean
): nil
boolean
): nil
Name | Type | Description |
---|---|---|
value |
|
Gets or sets unsafe state. Unsafe widgets have warning sign. Depends on argument.
:Unsafe(): boolean
boolean
:Get(): integer
integer
Returns index of the selected item. It starts from 0.
:Set(value: integer
): nil
integer
): nil
Name | Type | Description |
---|---|---|
value |
|
Sets widget's value.
:List(): string[]
string[]
Returns array of the items.
Name | Type | Description |
---|---|---|
imagePath |
| Path to the image. |
offset | Optional image offset. |
Sets widget's image.
Name | Type | Description |
---|---|---|
icon |
| icon unicode. |
offset | Optional icon offset. |
Sets widget's icon. Icons list
Example
:SetCallback(callback: fun(this: CMenuComboBox):nil
, forceCall [?]
: boolean
): nil
fun(this: CMenuComboBox):nil
, forceCall [?]
: boolean
): nil
Multiple callbacks could be set.
Name | Type | Description |
---|---|---|
callback |
| function to be called on widget change. |
forceCall |
| true if you want to call callback on widget creation. |
Sets widget's on change callback.
:UnsetCallback(callback: fun(this: CMenuComboBox):nil
): nil
fun(this: CMenuComboBox):nil
): nil
Name | Type | Description |
---|---|---|
callback |
| function to be removed from widget's callbacks. |
Removes widget's on change callback.
Name | Type | Description |
---|---|---|
name |
| Name of the attachment. |
color | Default color. |
Creates CMenuColorPickerAttachment
and attaches it to the widget.
Name | Type | Description |
---|---|---|
name |
| Name of the attachment. |
gearIcon |
| Gear FontAwesome icon. |
useSmallFont |
| Use small font for gear icon. |
Creates CMenuGearAttachment
and attaches it to the widget.
Last updated