DgsAddSizeHandler

From Multi Theft Auto: Wiki
Revision as of 01:59, 24 September 2018 by Thisdp (talk | contribs) (Created page with "{{Client function}} __NOTOC__ This function can make dgs element sizable like a window. '''Note: If applying size handler on dgs window, the original size handler will be rep...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function can make dgs element sizable like a window.

Note: If applying size handler on dgs window, the original size handler will be replaced.

Syntax

string dgsAddSizeHandler( element dgsElement [, float left = 0,float right = 0, float top = 0, float bottom = 0, bool relativeLeft = true, bool relativeRight = true, bool relativeTop = true, bool relativeBottom = true ] )

Required Arguments

  • dgsElement: The dgs element you want to add size handler to.

Optional Arguments

  • left: A float of the left border size of the DGS size handler relative to the dgs element. This is affected by the relativeLeft argument.
  • right: A float of the right border size of the DGS size handler relative to the dgs element. This is affected by the relativeRight argument.
  • top: A float of the top border size of the DGS size handler. This is affected by the relativeTop argument.
  • bottom: A float of the bottom border size of the DGS size handler. This is affected by the relativeBottom argument.
  • relativeLeft: This is whether left border size is relative. If this is true, then value must be between 0 and 1, representing value relative to the parent.
  • relativeRight: This is whether right border size is relative. If this is true, then value floats must be between 0 and 1, representing value relative to the parent.
  • relativeTop: This is whether top border size is relative. If this is true, then value floats must be between 0 and 1, representing value relative to the parent.
  • relativeBottom: This is whether bottom border is relative. If this is true, then value floats must be between 0 and 1, representing value relative to the parent.

Returns

Returns true if succeed, false otherwise

Example

DGS = exports.dgs
local button = DGS:dgsCreateButton(0.2,0.2,0.2,0.1,"test",true)
DGS:dgsAddSizeHandler(button,0.2,0.2,0.2,0.2)

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