For creating a Droplist I usually choose a ‘bank’ or a ‘slider’ (datatype: enum) from the prototype section of RAFX. Then in the designer section, I select a Droplist control from the ‘Object’ list. If you just assign your slider- or bank-variable to this droplist, it should work.
I think, if you want to populate the droplist during runtime, you’ll have to use the vstgui 4 library directly and create your own COptionMenu object. I have not tried this yet myself, but I've had success with creating and subclassing other vstgui objects.
Hope this helps!
Thank you for that tip.
I have looked some more into the RAFX code. I would almost think that in order to create the contents of Droplist control runtime, I would need to retrieve the Droplist from m_UIControlList. Then I would need to change its member cEnumeratedList to my runtime list separated by colons. And then I would probably need to call some refresh function. I hope Will can shed some more light on this.
You could help me by clarifying some things that are not clear to me yet, JD.
You said you subclassed other vstgui objects. So I take it you created a RangeParameter object and connected that with your custom vstgui object? Right.
I saw some example code of creating a COptionMenu. If I would use vstgui, I think what I would need to do is somehow retrieve the frame and then retrieve the COptionMenu from the frame and just clean the entry list and add my runtime entries. So the big question is how I retrieve that frame.
Well, I used the same approach for creating and subclassing the vstgui 4 objects as Will explained in the advanced GUI tutorials: http://www.willpirkle.com/supp.....tutorials/. Have you worked through these? They explain a relatively simple way of taking control over the GUI objects. I also checked the documentation for the COptionMenu (http://vstdev.richackard.com/v....._menu.html) and it has an addEntry() and removeEntry() function. I guess combined with multiple custom CMenuItem objects that will do the trick... I'm not sure if this answers your question, because you seem to have found a alternative approach. Let me know if you want me to try to build a test project using the approach from the tutorials 🙂
I gave it a try, and it's pretty easy to populate your droplist from within the code. The only thing is, if you assign a control link variable to your droplist in the designer section of RAFX it will only show the enumerated list from your control value (slider or bank). If you do not assign a control link value to your droplist you just call COptionMenu::addEntry("newItem") 🙂
JD Young said
Well, I used the same approach for creating and subclassing the vstgui 4 objects as Will explained in the advanced GUI tutorials: http://www.willpirkle.com/supp.....tutorials/. Have you worked through these? They explain a relatively simple way of taking control over the GUI objects.
Hello JD. I didn't watch the advanced tutorials yet. Need to get onto them. 🙂
You need to use a VSTGUI Plugin User Variable (to receive notifications) and a CView Custom View. I will post an example later.
Hello Will. Looking forward to the example. Thank you in advance.
Here is a sample project that uses a VSTGUI "Plugin User Variable" and a custom view CView object to implement the COptionMenu which is loaded with a bunch of strings at creation time.
For Plugin User Variables, see
The sample project is here:
Be sure to get very familiar with the COptionMenu object and its attributes/methods. This can be a somewhat "fickle" control at times.
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 1
Newest Members:channa, bvaccaro, HCassell, Max, Sim1, Chris Wade-Evans, Marlow, kcmixs2, DanieleR, jimjulian
Moderators: W Pirkle: 391
Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 391