GuiGridListSetColumnWidth: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 18: Line 18:


==Example==  
==Example==  
This page lacks an example
This example creates a gridlist and a column then checks if the column was create, after the column width is set to 0.4.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">gridlist = guiCreateGridList(332,195,286,249,false)
--add an example here
column = guiGridListAddColumn(gridlist,"Column",0)
 
if(column)then
guiGridListSetColumnWidth(column,0.4)
end
</syntaxhighlight>
</syntaxhighlight>


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

Revision as of 00:17, 28 April 2012

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

Syntax

bool guiGridListSetColumnWidth ( element gridList, int columnIndex, number width, bool relative )

Required Arguments

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

Returns

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

Example

This example creates a gridlist and a column then checks if the column was create, after the column width is set to 0.4.

gridlist = guiCreateGridList(332,195,286,249,false)
column = guiGridListAddColumn(gridlist,"Column",0)

if(column)then
	guiGridListSetColumnWidth(column,0.4)
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