WoW API: ToggleBag

Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API ToggleBag to API ToggleBag without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


WoW API < ToggleBag

"I" iconThis function is implemented in Lua here FrameXML/ContainerFrame.lua.


ToggleBag(bagNum);

Opens or closes the specified bag.


ParametersEdit

ArgumentsEdit

bagNum
Number - the bagId you want to toggle open or close

ReturnsEdit

nil

ExampleEdit

ToggleBag(2);


DetailsEdit

If toggling the backpack with the keyboard, this function is called when opening but NOT when closing. Closing appears to be done by ToggleBackpack(). However, if the mouse is used to close the Backpack then this function does respond.