WoW:API ToggleDropDownMenu: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
({{framexmlfunc|FrameXML/UIDropDownMenu.lua}} __NOTOC__)
m (Move page script moved page API ToggleDropDownMenu to API ToggleDropDownMenu without leaving a redirect)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{framexmlfunc|FrameXML/UIDropDownMenu.lua}} __NOTOC__
{{framexmlfunc|FrameXML/UIDropDownMenu.lua}}
 
Toggles a dropdown menu.
 
  ToggleDropDownMenu(level, value, dropDownFrame, anchorName, xOffset, yOffset)
  ToggleDropDownMenu(level, value, dropDownFrame, anchorName, xOffset, yOffset)
Toggles a dropdown menu.


== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
 
* level (number) - Nesting level of this dropdown.
:;level: Number - Nesting level of this dropdown.
* value (any type) - Custom value for the dropdown item, if 'level' > 1.
:;value : Object - Value of the dropdown item (if <tt>level</tt> > 1).
* dropDownFrame (frame table) - The frame object to toggle, not its string name.  This object should be derived from 'UIDropDownMenuTemplate'.
:;dropDownFrame : Object - The frame to toggle (not its name!).  This object should be derived from <tt>UIDropDownMenuTemplate</tt>.
* anchorName (string) - Sets the 'relativeTo' member of this frame. Optional
:;anchorName : String - Sets the <tt>relativeTo</tt> member of this frame.
* xOffset (number) - Sets the x offset. Optional
:;xOffset : Number - Sets the x offset.
* yOffset (number) - Sets the y offset. Optional
:;yOffset : Number - Sets the y offset.
* menuList (table) - Automatically Passed to the to 'menuList' on the [[API UIDropDownMenu_Initialize]] function, and set to 'menuList' member on the dropDownFrame frame table. Optional
* button (button table) - Drop down menu anchor point. Default is 'dropDownFrame' or successive parent dropdown menu button.
* autoHideDelay (number) - Seconds to delay before hiding an inactive menu. Default is 2.


=== Returns ===
=== Returns ===
: none


:;nil
== Examples ==
 
== Example ==
  ToggleDropDownMenu(1, nil, PlayerFrameDropDown, "PlayerFrame", 106, 27)
  ToggleDropDownMenu(1, nil, PlayerFrameDropDown, "PlayerFrame", 106, 27)

Latest revision as of 04:47, 15 August 2023

WoW API < ToggleDropDownMenu

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

Toggles a dropdown menu.

ToggleDropDownMenu(level, value, dropDownFrame, anchorName, xOffset, yOffset)

Parameters[edit]

Arguments[edit]

  • level (number) - Nesting level of this dropdown.
  • value (any type) - Custom value for the dropdown item, if 'level' > 1.
  • dropDownFrame (frame table) - The frame object to toggle, not its string name. This object should be derived from 'UIDropDownMenuTemplate'.
  • anchorName (string) - Sets the 'relativeTo' member of this frame. Optional
  • xOffset (number) - Sets the x offset. Optional
  • yOffset (number) - Sets the y offset. Optional
  • menuList (table) - Automatically Passed to the to 'menuList' on the API UIDropDownMenu_Initialize function, and set to 'menuList' member on the dropDownFrame frame table. Optional
  • button (button table) - Drop down menu anchor point. Default is 'dropDownFrame' or successive parent dropdown menu button.
  • autoHideDelay (number) - Seconds to delay before hiding an inactive menu. Default is 2.

Returns[edit]

none

Examples[edit]

ToggleDropDownMenu(1, nil, PlayerFrameDropDown, "PlayerFrame", 106, 27)