GuiGridListSetColumnWidth: Difference between revisions
Jump to navigation
Jump to search
(Test your scripts Jaysds1! You can't just add examples without testing them. I editted your example to what should be right, but you're the one who has to test it yet. And learn to english..) |
m (damned code tag doesnt like html comments :o) |
||
Line 19: | Line 19: | ||
==Example== | ==Example== | ||
This example creates a gridlist with one column that is too small to display. After the column has been successfully created, we give it a new width so you can see column. | This example creates a gridlist with one column that is too small to display. After the column has been successfully created, we give it a new width so you can see column. | ||
<!-- Why these odd positions? Examples look cleaner with numbers like 250 instead of 249. Dunno whether I should change them.--> | |||
<syntaxhighlight lang="lua">local gridlist = guiCreateGridList ( 332, 195, 286, 249, false ) | |||
local column = guiGridListAddColumn ( gridlist, "My column", 0 ) | local column = guiGridListAddColumn ( gridlist, "My column", 0 ) | ||
Revision as of 14:18, 9 May 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 with one column that is too small to display. After the column has been successfully created, we give it a new width so you can see column.
local gridlist = guiCreateGridList ( 332, 195, 286, 249, false ) local column = guiGridListAddColumn ( gridlist, "My column", 0 ) if column then guiGridListSetColumnWidth ( gridlist, column, 0.5 ) end
See Also
General functions
- guiBringToFront
- getChatboxLayout
- getChatboxCharacterLimit
- guiCreateFont
- guiBlur
- guiFocus
- guiGetAlpha
- guiGetCursorType
- guiGetEnabled
- guiGetFont
- guiGetInputEnabled
- guiGetInputMode
- guiGetPosition
- guiGetProperties
- guiGetProperty
- guiGetScreenSize
- guiGetSize
- guiGetText
- guiGetVisible
- guiMoveToBack
- guiSetAlpha
- guiSetEnabled
- guiSetFont
- guiSetInputEnabled
- guiSetInputMode
- guiSetPosition
- guiSetProperty
- guiSetSize
- guiSetText
- guiSetVisible
- isChatBoxInputActive
- isConsoleActive
- isDebugViewActive
- isMainMenuActive
- isMTAWindowActive
- isTransferBoxActive
- setChatboxCharacterLimit
- setDebugViewActive
Browsers
Buttons
Checkboxes
Comboboxes
- guiCreateComboBox
- guiComboBoxAddItem
- guiComboBoxClear
- guiComboBoxGetItemCount
- guiComboBoxGetItemText
- guiComboBoxGetSelected
- guiComboBoxIsOpen
- guiComboBoxRemoveItem
- guiComboBoxSetItemText
- guiComboBoxSetOpen
- guiComboBoxSetSelected
Edit Boxes
- guiCreateEdit
- guiEditGetCaretIndex
- guiEditGetMaxLength
- guiEditIsMasked
- guiEditIsReadOnly
- guiEditSetCaretIndex
- guiEditSetMasked
- guiEditSetMaxLength
- guiEditSetReadOnly
Gridlists
- guiCreateGridList
- guiGridListAddColumn
- guiGridListAddRow
- guiGridListAutoSizeColumn
- guiGridListClear
- guiGridListGetColumnCount
- guiGridListGetColumnTitle
- guiGridListGetColumnWidth
- guiGridListGetHorizontalScrollPosition
- guiGridListGetItemColor
- guiGridListGetItemData
- guiGridListGetItemText
- guiGridListGetRowCount
- guiGridListGetSelectedCount
- guiGridListGetSelectedItem
- guiGridListGetSelectedItems
- guiGridListGetSelectionMode
- guiGridListIsSortingEnabled
- guiGridListGetVerticalScrollPosition
- guiGridListInsertRowAfter
- guiGridListRemoveColumn
- guiGridListRemoveRow
- guiGridListSetColumnTitle
- guiGridListSetColumnWidth
- guiGridListSetHorizontalScrollPosition
- guiGridListSetItemColor
- guiGridListSetItemData
- guiGridListSetItemText
- guiGridListSetScrollBars
- guiGridListSetSelectedItem
- guiGridListSetSelectionMode
- guiGridListSetSortingEnabled
- guiGridListSetVerticalScrollPosition
Memos
- guiCreateMemo
- guiMemoGetCaretIndex
- guiMemoGetVerticalScrollPosition
- guiMemoSetVerticalScrollPosition
- guiMemoIsReadOnly
- guiMemoSetCaretIndex
- guiMemoSetReadOnly
Progressbars
Radio Buttons
Scrollbars
Scrollpanes
- guiCreateScrollPane
- guiScrollPaneGetHorizontalScrollPosition
- guiScrollPaneGetVerticalScrollPosition
- guiScrollPaneSetHorizontalScrollPosition
- guiScrollPaneSetScrollBars
- guiScrollPaneSetVerticalScrollPosition
Static Images
Tab Panels
Tabs
Text Labels
- guiCreateLabel
- guiLabelGetColor
- guiLabelGetFontHeight
- guiLabelGetTextExtent
- guiLabelSetColor
- guiLabelSetHorizontalAlign
- guiLabelSetVerticalAlign