Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
How do I create a Droplist in RackAfx?
No permission to create posts
December 13, 2015
12:54 am
Avatar
EZB
Member
Members
Forum Posts: 24
Member Since:
September 14, 2015
sp_UserOfflineSmall Offline

Hello Will

I was wondering how I can create a Droplist in RackAfx. I watched various tutorials, but I must be missing something.
And after I have a DropList how can I populate it during runtime?

December 13, 2015
4:35 pm
Avatar
JD Young
Leiden, The Netherlands
Admin
Forum Posts: 80
Member Since:
November 5, 2014
sp_UserOfflineSmall Offline

Hi EZB,

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!

JD

December 14, 2015
9:45 pm
Avatar
EZB
Member
Members
Forum Posts: 24
Member Since:
September 14, 2015
sp_UserOfflineSmall Offline

Hello JD

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.

December 14, 2015
10:20 pm
Avatar
JD Young
Leiden, The Netherlands
Admin
Forum Posts: 80
Member Since:
November 5, 2014
sp_UserOfflineSmall Offline

Hi EZB,

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 🙂

- JD

EDIT:

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") 🙂

December 15, 2015
8:48 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

You need to use a VSTGUI Plugin User Variable (to receive notifications) and a CView Custom View. I will post an example later.

- Will

December 16, 2015
12:37 am
Avatar
EZB
Member
Members
Forum Posts: 24
Member Since:
September 14, 2015
sp_UserOfflineSmall Offline

JD Young said
Hi EZB,

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.
- JD

Hello JD. I didn't watch the advanced tutorials yet. Need to get onto them. 🙂

Will said

You need to use a VSTGUI Plugin User Variable (to receive notifications) and a CView Custom View. I will post an example later.

- Will

Hello Will. Looking forward to the example. Thank you in advance.

December 16, 2015
3:16 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

You will need to go through the Advanced GUI Tutorials up to Module 5 (CustomViewsThree project) for anything to make sense.

- Will

December 16, 2015
10:03 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

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

http://www.willpirkle.com/foru.....variables/

The sample project is here:

http://www.willpirkle.com/Down.....opList.zip

Be sure to get very familiar with the COptionMenu object and its attributes/methods. This can be a somewhat "fickle" control at times.

- Will

December 18, 2015
2:39 am
Avatar
EZB
Member
Members
Forum Posts: 24
Member Since:
September 14, 2015
sp_UserOfflineSmall Offline

Hello Will

Thank you for your help. I will go through your tutorial modules first and then I will go to your example.

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 477

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 483

Posts: 1877

Newest Members:

Jaggxn, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143