This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

WidgetComboBox Class

This class creates a combo box.

WidgetComboBox Class

This class inherits from Widget

Members


WidgetComboBox (Gui gui)

Constructor. Creates an empty combobox.

Arguments

  • Gui gui - GUI, to which the new combobox will belong.

int addItem (string text, int icon)

Adds a new item with a given text and an icon.

Arguments

  • string text - Item text.
  • int icon - Zero-based ID of the icon.

Return value

Number of the added item.

void clear ()

Removes all items from the combobox.

string getCurrentItemText ()

Returns a text value of the currently selected item.

Return value

Item text.

int getCurrentItem ()

Returns the currently selected item.

Return value

Item number.

Image getImage ()

Returns the image with mini-icons.

Return value

Image with mini-icons.

string getItemText (int item)

Returns the text of a given item.

Arguments

  • int item - Item number.

Return value

Item text.

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 getNumItems ()

Returns the number of items in the combobox.

Return value

Number of items.

string getTexture ()

Returns file name of the image with mini-icons.

Return value

Path to the texture file.

void removeItem (int item)

Removes a given item from the combobox.

Arguments

  • int item - Item number.

void setCurrentItem (int item)

Selects a given item.

Arguments

  • int item - Item number.

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 setItemText (int item, string text)

Sets a text for a given item.

Arguments

  • int item - Item number.
  • string text - Item text.

void setItemTexture (int item, int icon)

Sets an icon for a given item.

Arguments

  • int item - Item number.
  • int icon - Zero-based ID of the icon.

void setTexture (string texture)

Sets a texture with mini-icons to be used with items. The texture is a vertical strip of square icons.

Arguments

  • string texture - Path to a texture file.
Last update: 03.07.2017
Build: ()