ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   select box (https://www.esoui.com/forums/showthread.php?t=1691)

hulksmash 05/31/14 07:43 PM

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?

stjobe 05/31/14 11:55 PM

You could look at what LibAddonMenu does to create its dropdown menu.

Seerah 06/01/14 12:17 AM

No, that's rather hackish, actually...

I'd look at this thread: http://www.esoui.com/forums/showpost...6&postcount=27

ingeniousclown 06/03/14 08:29 AM

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.


All times are GMT -6. The time now is 03:49 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI