Combox: how can I fill the list programmatically
Combox: how can I fill the list programmatically
I'm designing an external MIDI-In module and I want to be able to select any available MIDI-Ins from the ComboBox. In order to do that, I need to fill the ComboBox with available MIDI-In devices. Anyone knows, how to accomplish that?
Re: Combox: how can I fill the list programmatically
I'm giving up, because the interface from pep to scopefx is here not campatible.
Re: Combox: how can I fill the list programmatically
When I was mulling something similar before, my plan was to build the UI outside of Scope (using Juce) and then just launching it from within Scope (similar to how ScopeSync works)
Re: Combox: how can I fill the list programmatically
That was my first approach, but it can't be used as surface. I found a way to work around this. If you want to know, just send me the usual email.
- sunmachine
- Posts: 558
- Joined: Mon Mar 01, 2010 12:37 am
Re: Combox: how can I fill the list programmatically
It would be great if you could post your workaround here and/or in the SDK Wiki.
Might come in handy one day.
Might come in handy one day.

Re: Combox: how can I fill the list programmatically
Here you are:
1. Add to your module, which includes 1 or more ComboBoxes (CB), 3 pads for each CB: input 'index' and outputs 'max' and 'selected string'.
2. Add a 'SingleLineText' from Design/Surfaces and connect the 'Str'-Pad to 'selected string'
3. Add a TextFader from Design/surface/controls. In the pad list go to vars and create pad for 'max'. Connect 'value' to 'index' and 'max' to 'max'.
If proper programmed, you can select by using the taxt fader (move pressed mosue left/right within the field).
Proper program can look like:
int sel = asyncIn[INPAD_INDEX]->itg;
if (sel < extMidiGUI->midiOutputList->getNumItems())
{
extMidiGUI->midiOutputList->setSelectedItemIndex(sel, true);
extMidiGUI->setMidiOutput(sel);
}
String::CharPointerType item = extMidiGUI->midiOutputList->getItemText(extMidiGUI->midiOutputList->getSelectedItemIndex()).getCharPointer();
asyncOut[OUTPAD_SELECTION].str = (char *)item.getAddress();
asyncOut[OUTPAD_MAX].itg = extMidiGUI->midiOutputList->getNumItems();
1. Add to your module, which includes 1 or more ComboBoxes (CB), 3 pads for each CB: input 'index' and outputs 'max' and 'selected string'.
2. Add a 'SingleLineText' from Design/Surfaces and connect the 'Str'-Pad to 'selected string'
3. Add a TextFader from Design/surface/controls. In the pad list go to vars and create pad for 'max'. Connect 'value' to 'index' and 'max' to 'max'.
If proper programmed, you can select by using the taxt fader (move pressed mosue left/right within the field).
Proper program can look like:
int sel = asyncIn[INPAD_INDEX]->itg;
if (sel < extMidiGUI->midiOutputList->getNumItems())
{
extMidiGUI->midiOutputList->setSelectedItemIndex(sel, true);
extMidiGUI->setMidiOutput(sel);
}
String::CharPointerType item = extMidiGUI->midiOutputList->getItemText(extMidiGUI->midiOutputList->getSelectedItemIndex()).getCharPointer();
asyncOut[OUTPAD_SELECTION].str = (char *)item.getAddress();
asyncOut[OUTPAD_MAX].itg = extMidiGUI->midiOutputList->getNumItems();
- sunmachine
- Posts: 558
- Joined: Mon Mar 01, 2010 12:37 am
Re: Combox: how can I fill the list programmatically
Thanks, DragonSF!