ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. guiCreateScrollPane

Function

guiCreateScrollPane

Creates a scrollable area. Child controls that do not fit can be scrolled.

Syntax

gui-scrollpane guiCreateScrollPane(float x, float y, float width, float height, bool relative [, element parent = nil])

Arguments

xfloat
X position.
yfloat
Y position.
widthfloat
Width.
heightfloat
Height.
relativebool
Relative values.Optional in MTA:SA: bool relative = false
parentelement, optional = nil
Parent.

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

guiCreateScrollPane(float x, float y, float width, float height, bool relative = false, gui-element parent = nil)

Returns

The area.

Example

local win = guiCreateWindow(100, 100, 320, 300, "Lista", false)
local pane = guiCreateScrollPane(10, 35, 300, 255, false, win)
for i = 1, 30 do
    guiCreateLabel(0, (i - 1) * 24, 280, 22, "Pozycja " .. i, false, pane)
end