API:ListBoxSetVisibleRowCount
From RoR Wiki
UI Lua API · ListBox functions
Version: WAR 1.4.8
Changes how many row windows a ListBox has.
ListBoxSetVisibleRowCount(listBoxName, rowCount)
Arguments
- listBoxName
string– Name of the ListBox.- rowCount
number– New number of visible rows (converted to a whole number).
Returns
Nothing.
Details
- Row windows are created or destroyed so that the ListBox has
rowCountrows, and the rows are refreshed from the data. - If the count is already
rowCount, nothing happens. - The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.
Errors
Error in function call 'ListBoxSetVisibleRowCount': Incorrect parametersError in function call 'ListBoxSetVisibleRowCount': Window %s does not existError in function call 'ListBoxSetVisibleRowCount': Window %s is not a ListBox
Example
Sizing two lists to their content, from default/ea_interactionwindow/source/interactionbase.lua:
ListBoxSetVisibleRowCount("EA_Window_InteractionBaseQuestList", #questDisplayOrder)
ListBoxSetVisibleRowCount("EA_Window_InteractionBaseOptionList", #optionDisplayOrder)
