Talk:UI Object UIDropDownMenu

I have found that parts of the UIDropDownMenu can be set up in the XML file. For example,

           UIDropDownMenu_SetWidth(240, this); UIDropDownMenu_Initialize(this,MyAddOn_Select_Initialize);   

The Initialize and Click functions in my AddOn's lua file are much as is on the definition page here. One thing I couldn't find a way to do, though, was to set the origin of the button list shown when you click the DropDown's button; it always wanted to align its TopLeft to the parent's BottomLeft. A more appropriate place for mine would be with right edges aligned.

ClemSnide 09:13, 19 April 2007 (EDT)

HOWTO
This article reads a lot like a HOWTO article... and we've already got one of those on this subject. I think some consolidation and changes to both pages are needed. I've done some work with popup menus, but I wouldn't call myself an expert. Anyone with more experience have any ideas? -- Tuhljin (talk) 20:42, 11 May 2008 (UTC)


 * Fixed it. Somewhat. -- foxlit (talk) 16:35, November 13, 2009 (UTC)

Changes in 3.0.2
Blizzard swap around the args for some of the functions in the UIDropDownMenu.lua to make the first arg always be the reference to the frame object. Because of this, functions such as UIDropDownMenu_SetText have to be changed from UIDropDownMenu_SetWidth("text", frame) to UIDropDownMenu_SetWidth(frame, "text"). I will edit the article to reflect these new changes.

Here is a list of functions I have found in UIDropDownMenu.lua that have been changed:


 * UIDropDownMenu_SetWidth(frame, width, padding)
 * UIDropDownMenu_SetButtonWidth(frame, width)
 * UIDropDownMenu_SetText(frame, text)
 * UIDropDownMenu_JustifyText(frame, justification)

--SavageX378 (talk) 21:46, 15 October 2008 (UTC)