Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WindowSetParent

From RoR Wiki
Revision as of 19:51, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Window functions
Version: WAR 1.4.8

Moves a window under a different parent window.

WindowSetParent(windowName, parentName)

Arguments

windowName
string – Name of the window to move.
parentName
string – Name of the new parent. Use "Root" to make it a top-level window.

Returns

Nothing.

Details

  • The window is removed from its old parent's child list and added to the new parent's.
  • The window's depth becomes the new parent's depth plus one.
  • The window's anchors are not changed. Anchors that point at the old parent keep pointing at it, so re-anchor the window if it should follow the new parent.
  • There is no check for loops. Making a window the parent of one of its own ancestors is not refused.
  • The root window cannot be given a parent.
  • The function needs at least two arguments and only reads the last two.

Errors

  • Error in function call 'WindowSetParent': Window %s does not exist
  • Error in function call 'WindowSetParent': Parent Window %s does not exist
  • Error in function call 'WindowSetParent': The parent of the root window cannot be changed.
  • Error in function call 'WindowSetParent': Window %s is currently locked and may not be modified from lua. ...
    This check never triggers in the current client. See WindowSetShowing.

Example

Detaching context-menu items so they draw above other windows, from ea_contextmenu/source/contextmenu.lua:

WindowSetParent( menuItemName, "Root" )

Moving a chat tab into another tab group, from ea_chatwindow/source/chatwindow.lua:

WindowSetParent( tabWndName, tabParent )
WindowSetParent( tabLogDisplayName, EA_ChatWindowGroups[newWndGroupId].name )

See also