Columns in a Listbox

I have an array 1 million object where each object is an object made up of 5 properties. The ListBox widget seems to be capable of handling 1 million items due to the use of ImGuiListClipper but I need to add columns to the ListBox in order to display each property making up each object.

I modified the call to ImGui::ListBox to use ImGui::BeginColumns() and ImGui::EndColumns() but I was wondering if there was an out of the box solution or a better way to display these 1 million objects?

Thank you!


If you look into ListBox() you’ll find that this function doesn’t do much, it call ListBoxHeader/Footer. So the idea is that rewriting this loop into your code is perfectly, and ListBox() itself should be seen as a high-level helper only the simplest case.

Thank you! This very useful :slight_smile: