Create slider for a list of strings


#1

Is there any way I can use an ofxSlider over a list of strings? For example, a list of keys in a map<string, object>.


#2

you can use it as the index for that map, or a vector might be easier.
you can also use this addon.
let me know if you need help.
cheers


#3

I did not know about this addon, this is really useful. A dropdown menu is what I am missing mostly in ofxGui.


#4

thanks. yes. I think that it should eventually go into the official addon, yet it still needs some work to make it more flexible. Any feedback, fix or improvement is very welcome :slight_smile:
Cheers


#5

Thanks for sharing this!

( I had to comment out group.disableHeader() in ofxDropdown.cpp (line 41). )


#6

How do I add this to my project? Project Generator doesn’t seem to detect it and doesn’t show it in the list of addons when attempting to Update my project…

Thanks again!


#7

the disableHeader() is a function that was recently added to ofxGui. try using the latest nightly build, found here or the current github master branch.

you need to place the ofxDropdown in the addons folder. if you had project generator opened, close it and open again.


#8

This is how I had done it - didn’t work. I clone the repo directly into the addons folder and restarted Project Generator.

the disableHeader() is a function that was recently added to ofxGui. try using the latest nightly build, found here or the current github master branch.

Okay, thanks. I’m currently using 10.1 release.

I did run the example in ofxDropdown - it’s very nifty, thanks for working on it and sharing.


#9

is it still not working?
What are you getting?


#10

Thanks :slight_smile:


#11

Huh - I quit Project Generator and tried again. Works now. Weird. Sorry about that


#12

ok. good to know.
cheers