DgsMemoSetMaxLength

From Multi Theft Auto: Wiki

This function sets the maximum text length that can be typed into a memo.

Syntax

bool dgsMemoSetMaxLength ( element theElement, int length )

Required Arguments

  • theElement: The dgs-dxmemo to be changed.
  • length: An integer indicating the maximum number of characters that can be typed into the memo.

Returns

Returns true if the max length was set successfully, false otherwise.

Example

This example creates an memo with a limit on text length.

DGS = exports.dgs
memo = DGS:dgsCreateMemo( 0.3, 0.1, 0.4, 0.5, "Type your message here!", true )
-- set a maximum text length of 128 characters
DGS:dgsMemoSetMaxLength ( memo, 128 )

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