DgsMemoSeekPosition

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

This function transform the position (index and line) correctly of the text in memo.

Syntax

int int dgsMemoSeekPosition ( element dxMemo, int index, int line [, bool transformLine = true ] )

Required Arguments

  • dxMemo: The dgs-dxmemo you want to get the data from.
  • index: An integer of index to be transformed (index >= 0).
  • line: An integer of line to be transformed (line >= 1).

Optional Arguments

  • transformLine: A bool indicates whether the line will be changed when the index is out of range in current line.

Example

This example creates a combo box in the center of the screen.

DGS = exports.dgs 

memo = DGS:dgsCreateMemo(0.29, 0.30, 0.44, 0.04, "", true)
DGS:dgsSetText(memo,[[
This is a test script.
Example
Function: dgsMemoSeekPosition
]])

local index,line = dgsMemoSeekPosition(memo,40,1)
outputChatBox("Old Value> Index = 40; Line = 1")
outputChatBox("New Value> Index = "..index,,"; Line = "..line)

See Also

Custom Cursor Functions

Multi Language Supports

Animation

3D Element

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

Menu

Label

Layout

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Basic Shape Plugins

Circle

Quadrilateral

Rounded Rectangle

Other Plugins

Blur Box

Canvas

Chart

Color Picker

Effect 3D

Gradient

Mask

Media Browser

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Screen Source

SVG

Tooltips