In OF, Is there any addon looks like "ListView"

#1

Hi, All.

In OF, Is there any addon looks like “ListView” that has clickable ,sortable, scrollable array items?

I wonder.

Thanks.

#2

Hi,
I think that ofxGuiExtended has something like that.
Also, I made a simple addon that allows adding dropdowns to ofxGui, https://github.com/roymacdonald/ofxDropdown . It is still a work in progress but it is useful right now.

1 Like
#3

another way but using ofxImGui:

1 Like
#4

well, @bemoregt, this is on another fork,
but on the main fork of ofxImGui you can see (example-demo) that now is implemented:

if(!fileNames.empty())
    {
        
        //ofxImGui::VectorListBox allows for the use of a vector<string> as a data source
        static int currentListBoxIndex = 0;
        if(ofxImGui::VectorListBox("VectorListBox", &currentListBoxIndex, fileNames))
        {
            ofLog() << " VectorListBox FILE PATH: "  << files[currentListBoxIndex].getAbsolutePath();
        }
        
        //ofxImGui::VectorCombo allows for the use of a vector<string> as a data source
        static int currentFileIndex = 0;
        if(ofxImGui::VectorCombo("VectorCombo", &currentFileIndex, fileNames))
        {
            ofLog() << "VectorCombo FILE PATH: "  << files[currentFileIndex].getAbsolutePath();
        }
    }
1 Like