DgsSwitchButtonGetText

From Multi Theft Auto: Wiki

This function gets the text of switch button.

Syntax

string,string dgsSwitchButtonGetText( element switchButton )

Required Arguments

  • switchButton: Switch you want to get text from.

Returns

Returns two string indicate the text of ON and OFF of the Switch Button.

Example

DGS = exports.dgs
button = DGS:dgsCreateSwitchButton( 0.7, 0.1, 0.2, 0.1, "On", "Off", true, true )
addEventHandler ( "onDgsMouseClickDown", button, function()
    local textOn, textOff = DGS:dgsSwitchButtonGetText(button)
    outputChatBox ( textOn)
    outputChatBox ( textOff)
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

Paste Handler

QRCode

Remote Image

Rounded Rectangle