Thread Tools Display Modes
Prev Previous Post   Next Post Next
05/07/15, 04:57 PM   #1
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
How to update a ComboBox database list?

I have a ComboBox dropdown menu that is populated by a database of character names.

I have a function that removed the selected character name from the database and re-selects the currently logged in character.

The problem is, I want to remove that name from the drop down list when this function files.

I have tried GetItems() UpdateItems() and others to no avail.

Does anyone know how to update the list?

I used this to populate it:

Code:
	for k, v in pairs(nameList) do
		local entry = charnameDropdown.dropdown:CreateItemEntry(v, OnItemSelect)
		charnameDropdown.dropdown:AddItem(entry)
	end
I can't seem to find a RemoveItem() function...

It seems if I can re-initialize the main control I can just rebuild it. I'm not sure how to "delete" a control though.

Can I just set it to nil and re-run my initialization function? Testing...

EDIT: Yeah... no. That didn't work. "Duplicate name" still exists.

Last edited by Phinix : 05/07/15 at 05:04 PM.
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » How to update a ComboBox database list?


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