Thread Tools Display Modes
05/31/14, 07:43 PM   #1
hulksmash
 
hulksmash's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 30
select box

I am looking for documentation on how to make a select box? This would be similar to html tags:
Code:
 <select><option></option></select>
What kind of control would I use for this?
  Reply With Quote
05/31/14, 11:55 PM   #2
stjobe
 
stjobe's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
You could look at what LibAddonMenu does to create its dropdown menu.
  Reply With Quote
06/01/14, 12:17 AM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
No, that's rather hackish, actually...

I'd look at this thread: http://www.esoui.com/forums/showpost...6&postcount=27
  Reply With Quote
06/03/14, 08:29 AM   #4
ingeniousclown
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 122
I still prefer the vanilla combobox template, as it doesn't come with an extra label that you may not want:

lua Code:
  1. local dropdown = WINDOW_MANAGER:CreateControlFromVirtual(parent:GetName() .. "DropdownFilter", parent, "ZO_ComboBox")
  2.  
  3. parent.dropdown = dropdown
  4. dropdown:SetHidden(true)
  5. dropdown:SetAnchor(LEFT, self.control, LEFT, 10)
  6. dropdown:SetHeight(24)
  7. if(dropdownWidth) then
  8.     dropdown:SetWidth(dropdownWidth)
  9. end
  10. local comboBox = dropdown.m_comboBox
  11. comboBox:SetSortsItems(false)
  12.  
  13. for _,v in ipairs(callbackTable) do
  14.     comboBox:AddItem(ZO_ComboBox:CreateItemEntry(tooltipSet[v.name], function()
  15.             OnDropdownSelect(v)
  16.         end))
  17. end

A snippit from my Advanced Filters add-on.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » select box

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off