DgsSelectorGetItemText

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This function retrieves the text from a specific selector item.

Syntax

string dgsSelectorGetItemText ( element selector, int item )

Required Arguments

  • selector: the gridlist containing the item you're interested in
  • item: the index of the item

Returns

Returns the text of the item if the arguments are correct, false otherwise.

Example

DGS = exports.dgs

local selector = DGS:dgsCreateSelector ( 0.473, 0.462, 0.052, 0.018, true )
for i=1,5 do
	DGS:dgsSelectorAddItem(selector,i)
end

addEventHandler ( "onDgsSelectorSelect", selector, function ( selected )
	local output = DGS:dgsSelectorGetItemText(selector,selected)
	outputChatBox(output,255,0,0)
end )

See Also

Custom Cursor Functions

Multi Language Supports

Animation

3D Interface

3D Line

3D Image

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Drag'N Drop

Grid List

Image

Memo

Label

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Plugin

Blur Box

Color Picker

Canvas

Circle

Effect 3D

Media Browser

Mask

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Rounded Rectangle