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

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Selector

Switch Button

Tab Panel

Window

Plugin

Blur Box

Color Picker

Canvas

Effect 3D

Media Browser

Mask

Nine Slice

Object Preview Supports

QRCode

Remote Image

Rounded Rectangle