Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WindowSetTabOrder

From RoR Wiki

UI Lua API · Window functions
Version: WAR 1.4.8

Sets a window's tab order number.

WindowSetTabOrder(windowName, tabOrder)

Arguments

windowName
string – Name of the window.
tabOrder
number – The tab order number.

Returns

Nothing.

Details

  • tabOrder is truncated towards zero to a whole number and stored on the window. Read it back with WindowGetTabOrder.
  • The stock UI sets it on windows that need tabbed focus, such as edit boxes (see the comment in the example).
  • There is no lock check in this function.
  • The function needs at least two arguments and only reads the last two.

Errors

  • Error in function call 'WindowSetTabOrder': Window %s does not exist

Example

From ea_helpwindow/source/ea_window_appeal.lua:

if sectionData.tabOrder ~= nil then		-- 3.5) If the window is an edit box(or any other window requiring tabbed focus), set its tab order
    WindowSetTabOrder(newWindowName, sectionData.tabOrder)
end

See also