GuiGridListSetScrollBars: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(OOP syntax)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Client function}}
{{Client function}}
__NOTOC__  
__NOTOC__  
This function allows a gridlists to be forced '''on''', or returned to default.
This function allows a gridlist's scrollbar to be forced '''on''', or returned to default.


==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool guiGridListSetScrollbars ( element guiGridlist, bool horizontalBar, bool verticalBar )
bool guiGridListSetScrollBars ( element guiGridlist, bool horizontalBar, bool verticalBar )
</syntaxhighlight>  
</syntaxhighlight>
{{OOP||[[Element/GUI/Gridlist|GuiGridList]]:setScrollBars}}


===Required Arguments===  
===Required Arguments===  
Line 17: Line 18:


==Example==  
==Example==  
This page does not have an example
This example creates a gridlist and checks if it's created then sets the scroll bars. (TESTED!)
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">gridlist = guiCreateGridList(332,195,286,249,false)
--add an example here
 
if(gridlist)then
guiGridListSetScrollBars(gridlist,true,true)
end
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{GUI functions}}
{{GUI functions}}
[[Category:Needs_Example]]
{{GUI_events}}
 
----

Latest revision as of 21:19, 7 November 2018

This function allows a gridlist's scrollbar to be forced on, or returned to default.

Syntax

bool guiGridListSetScrollBars ( element guiGridlist, bool horizontalBar, bool verticalBar )

OOP Syntax Help! I don't understand this!

Method: GuiGridList:setScrollBars(...)


Required Arguments

  • guiGridlist: The GUI gridlist you wish to change the state of scrollbars
  • horizontalBar: A bool where true forces the horizontal scrollbar on, and false returns them to default.
  • verticalBar: A bool where true forces the verical scrollbar on, and false returns them to default.

Returns

Returns true if the scrollbars were successfully set, false otherwise.

Example

This example creates a gridlist and checks if it's created then sets the scroll bars. (TESTED!)

gridlist = guiCreateGridList(332,195,286,249,false)

if(gridlist)then
	guiGridListSetScrollBars(gridlist,true,true)
end

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI