DgsGridListGetColumnAllWidth

From Multi Theft Auto: Wiki

This function is used to get the total width from 1 to specific column index of dgs gridlist.

Syntax

float dgsGridListGetAllColumnWidth( element dgsGridlist, int columnIndex [, bool relative = false, bool fastFind = false ] )

Required Arguments

  • dgsGridlist: The dgs grid list you want to get the column width from
  • columnIndex: End Column ID

Optional Arguments

  • relative: This is whether sizes and positioning are relative. If this is true, then all x,y,width,height floats must be between 0 and 1, representing sizes relative to the parent.
  • fastFind: Whether to enable fast find ( best performance but may be incorrect due to bugs ) or exactly find ( won't be any bug but low performance ).

Returns

Returns a float if succeed, false otherwise.

Example

DGS = exports.dgs
list = DGS:dgsCreateGridList(0.80, 0.10, 0.15, 0.60, true) -- Create the grid list
c1= DGS:dgsGridListAddColumn(list, "New column", 0.9) -- Create a new column in the grid list
c2= DGS:dgsGridListAddColumn(list, "New column", 0.9) -- Create a new column in the grid list
c3= DGS:dgsGridListAddColumn(list, "New column", 0.9) -- Create a new column in the grid list
c4= DGS:dgsGridListAddColumn(list, "New column", 0.9) -- Create a new column in the grid list
width = DGS:dgsGridListGetColumnAllWidth(list, c4, true)
outputChatBox(width) --returns 3.6

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