DgsComboBoxAddItem

From Multi Theft Auto: Wiki

Adds an item to a combobox.

Syntax

int dgsComboBoxAddItem( element comboBox, string value )

Required Arguments

  • comboBox: The dgs combobox you want to add a row to
  • value: The text that the item will contain.

Returns

Returns the item ID if it has been created, false otherwise.

Example

This Example will add an item to comboBox when player use command addItem followed by the value of the item.

DGS = exports.dgs

comboBox = DGS:dgsCreateComboBox(200,200,100,30,"test",false)
addCommandHandler("addItem",function (command, value)
	DGS:dgsComboBoxAddItem(comboBox, value)
	outputChatBox("Item with text " .. value .. " has been added!")
end)

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D

Nine Slice