Quantcast Pulldowns, lists and tabs. - WoWInterface
Thread Tools Display Modes
02-08-09, 02:40 PM   #1
A Deviate Faerie Dragon
Join Date: Feb 2009
Posts: 14
Pulldowns, lists and tabs.

Hello everyone. I'm working on an addon with a config window that I'd like to include the three items I listed in the thread title.

First off I'm using the WoW UI Designer to implement the main configuration dialog box. I know how to write software and HDL so I've sort of reverse engineered LUA/XML (although I'm far from an expert) so if there are any limitations to the WoW UI tool then I'm comfortable working in the XML directly if that helps me get what I need.

Pulldown menus - I have a few settings that would work best if they were selected from a list. The WoW UI Designer has a "ComboBox" widget that implements this feature. I haven't found any information on the forum as to whether or not this widget works but it seems like a lot of people recommend coding these pulldowns manually. The combobox works from a "mechanical" standpoint but I haven't been able to figure out how to extract the value into a variable that I can then use.

Does the combobox widget work? If so then how do I get it's value? If it does not then I'll have to go back to some of the threads I found that do it manually or do it an entirely different way altogether.

Lists - I'll get real specific here: I want to be able to create a list based off of people in my group/raid. Again this would work best for me if it ended up as a list of items in a pulldown menu so I can easily select individuals from the group.

How do I build a dynamically populated list of unknown length?

Tabs - I have enough stuff in my dialog that if I could spread it across multiple tabs that would be really cool. Are tabs just separate frames with buttons to jump to the other tabs are is there a more pre-canned way to implement a tabbed window structure?

Thanks for your help.
  Reply With Quote
02-09-09, 04:32 AM   #2
Premium Member
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
You'll find a description and some examples for the dropdown widget over here.
  Reply With Quote
02-09-09, 10:45 PM   #3
A Deviate Faerie Dragon
Join Date: Feb 2009
Posts: 14
Hmm... I guess I don't totally understand what to do here. I understand the code for initializing the menu and what to do when it's clicked, but where exactly do I put the actual frame creation stuff at the very top of the discussion? I'm not used to building frames in the .lua code directly so I'm not sure where exactly this needs to go.

The writeup implies that the frame/menu gets created on they fly every time it's clicked so does that mean the creation stuff can go right in the Initialize function? I tried that and it doesn't do anything but I may have just implemented it wrong. Before I spent a whole lot of time I figured I'd just ask first.
  Reply With Quote
02-09-09, 11:08 PM   #4
Fishing Trainer
Seerah's Avatar
WoWInterface Super Mod
Join Date: Oct 2006
Posts: 10,690
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
03-19-09, 09:23 PM   #5
A Deviate Faerie Dragon
Join Date: Feb 2009
Posts: 14
So I got out rev 1 of my addon a while back and discovered a problem just recently with the pulldown menus. It took a pretty specific situation to make it show up and now I'm stumped as to how to fix it.

The menus themselves work great. They have predefined lists (not dynamic) and they set the variables they control accordingly. The problem is that if the settings they change are done outside of the addon it doesn't know and even if I had code to check the setting I can't figure out how to change the menu accordingly.

More specifically, one of my pulldown menus sets the loot threshold. The menu is built of the standard WoW list (uncommon, rare, epic, legendary). When I form a group/raid and open the addon it defaults to uncommon. That's ok, the loot threshold always does when you start a group.

But! If someone else started the group and changed the loot settings then passed me leader the addon doesn't reflect those settings. (Oversight on my part when doing the design.) So I wrote a function that checks for those settings "OnShow" in order to update the menus based on the current setting. However, I can't find any way, in any of the material listed above or anywhere else, to change the pulldown menu selection outside of actually using the pulldown menu. I thought it was treated as just a button so Button:SetText("blah") but it didn't work.

This problem would also occur if the menu was a saved variable. I can get the setting I want, I just don't know how to update the menus current selection to reflect it.

Any ideas?
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Pulldowns, lists and tabs.

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