Unigine.WidgetComboBox Class
Inherits: | Widget |
This class creates a combo box.
WidgetComboBox Class
Properties
int CurrentItem#
The currently selected item.
set
Sets a given item as selected.
set value -
Item number.
int NumItems#
The number of items in the combobox.
string Texture#
Path to the image with mini icons, which are used with combobox items.
set
Sets a texture with mini icons to be used with items. The texture is a vertical strip of square icons.
set value -
Path to a texture file.
Members
static WidgetComboBox ( Gui gui ) #
Constructor. Creates an empty combobox.Arguments
- Gui gui - GUI, to which the new combobox will belong.
WidgetComboBox Cast ( Widget widget ) #
Casts a WidgetComboBox out of the Widget instance.Arguments
- Widget widget - Widget instance.
Return value
WidgetComboBox instance.string GetCurrentItemData ( ) #
Returns the data of the currently selected item. The data can be used as a text identifier of the item (instead of using the number of the item).Return value
Item data.string GetCurrentItemText ( ) #
Returns a text value of the currently selected item.Return value
Item text.void SetImage ( Image image ) #
Sets an image with mini icons to be used with items. The image is a vertical strip of square icons.Arguments
- Image image - Image to set.
void GetImage ( Image image ) #
Returns the image with mini icons, which are used with the combobox items.Arguments
- Image image
void SetItemData ( int item, string str ) #
Sets the data for a given item. The data can be used as a text identifier of the item (instead of using the number of the item).Arguments
- int item - Item number in range from 0 to the total number of items.
- string str - Data to set.
string GetItemData ( int item ) #
Returns the data of a given item. The data can be used as a text identifier of the item (instead of using the number of the item).Arguments
- int item - Item number in range from 0 to the total number of items.
Return value
Item data.void SetItemText ( int item, string str ) #
Sets a text for a given item.Arguments
- int item - Item number.
- string str - Item text.
string GetItemText ( int item ) #
Returns the text of a given item.Arguments
- int item - Item number.
Return value
Item text.void SetItemTexture ( int item, int texture ) #
Sets an icon for a given item.Arguments
- int item - Item number.
- int texture - Zero-based ID of the icon.
int GetItemTexture ( int item ) #
Returns the icon of a given item.Arguments
- int item - Item number.
Return value
Zero-based ID of the icon.int AddItem ( string str, int texture = -1 ) #
Adds a new item with a given text and an icon.Arguments
- string str - Item text.
- int texture - Zero-based ID of the icon.
Return value
Number of the added item.void Clear ( ) #
Removes all items from the combobox.void RemoveItem ( int num ) #
Removes a given item from the combobox.Arguments
- int num - Item number.
int type ( ) #
WidgetComboBox type.Return value
WidgetComboBox type identifier.Last update:
2019-08-16
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)