Originally Posted by pas06
As i said i am not familiar with that function but what about doing this:
Lua Code:
local function HSelector(self) local toSort = {} for k in pairs(BangCharHateds) do toSort[#toSort + 1] = k end table.sort(toSort) for i = 1, #toSort do local info = UIDropDownMenu_CreateInfo(); info.text = toSort[i] info.value = toSort[i] info.func = function() end; UIDropDownMenu_AddButton(info); end end local function Initialize_UIDropDownMenu(btn) UIDropDownMenu_Initialize(btn, HSelector) UIDropDownMenu_SetWidth(btn, 120) UIDropDownMenu_SetButtonWidth(btn, 124) UIDropDownMenu_SetSelectedID(btn, 1) UIDropDownMenu_JustifyText(btn, "LEFT") end local dropdown = CreateFrame("Frame", "HSelector", UIParent, "UIDropDownMenuTemplate"); dropdown:SetPoint("CENTER", 0, 0) dropdown:Show() Initialize_UIDropDownMenu(dropdown);
|
Create a menu selector with the database names.