DgsGridListResetScrollBarPosition

From Multi Theft Auto: Wiki

This function reset the position of vertical and horizontal scroll bars.

Syntax

bool dgsGridListGetScrollBar( element gridList [, bool verticalStay = false, bool horizontalStay = false ] )

Required Arguments

  • gridList: The dgs grid list element to be got from.
  • verticalStay: Whether the vertical scroll bar won't be affected.
  • horizontalStay: Whether the horizontal scroll bar won't be affected.

Returns

Returns true if succeeded, false otherwise.

Example

DGS = exports.dgs

local list = DGS:dgsCreateGridList ( 0.45, 0.45, 0.15, 0.15, true ) 
local column = DGS:dgsGridListAddColumn( list, "text", 0.85 )
for i=1,50 do
	local row = DGS:dgsGridListAddRow ( list )
	DGS:dgsGridListSetItemText ( list, row, column, tostring(i) )
end

setTimer(function()
	DGS:dgsGridListResetScrollBarPosition ( list )
end,2000,0)
--You can move the scroll bar by your mouse.

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D

Nine Slice

Object Preview

QRCode

mask