Columns in a Listbox

#1

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!

0 Likes

#2

Hello,

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.

0 Likes

#3

Thank you! This very useful :slight_smile:

0 Likes