GuiGridListGetColumnWidth: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(OOP syntax)
mNo edit summary
 
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool guiGridListGetColumnWidth ( element gridList, int columnIndex, bool relative )
float guiGridListGetColumnWidth ( element gridList, int columnIndex, bool relative )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Element/GUI/Gridlist|GuiGridList]]:getColumnWidth}}
{{OOP||[[Element/GUI/Gridlist|GuiGridList]]:getColumnWidth}}
Line 15: Line 15:


===Returns===
===Returns===
Returns ''true'' if the gridlist column width was successfully set, ''false'' if bad arguments were given.
Returns the width of the gridlist column, ''false'' if bad arguments were given.


==Example==  
==Example==  

Latest revision as of 20:06, 10 April 2019

This allows you to get the width of an existing column in a gridlist.

Syntax

float guiGridListGetColumnWidth ( element gridList, int columnIndex, bool relative )

OOP Syntax Help! I don't understand this!

Method: GuiGridList:getColumnWidth(...)


Required Arguments

  • gridList: The grid list you want to add a column to
  • columnIndex: Column ID of the Get size
  • relative: A boolean defining whether width measurements will be relative to the Gridlist size, or absolute pixels.

Returns

Returns the width of the gridlist column, false if bad arguments were given.

Example

grid = guiCreateGridList(313, 354, 162, 100, false)
c = guiGridListAddColumn(grid, "test",0.5)

addCommandHandler("With",function()
With = guiGridListGetColumnWidth(grid ,c, true)
outputChatBox("Column Width = "..With)
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