I created a class (in Projucer) that derives from ListBox and ListBoxModel, and sets itself as the model. Then I dropped a Generic Component on a view component, and set its class to my derived class. When I generate my projects, I get a paint() function in the class, but had to add the paintListBoxItem() function myself. I did so, and added code there to draw the appropriate text for the given row. I also populated a list of Strings to be shown in the listbox, and implemented getNumRows() to return the number of strings added.
My question is: do I have to write code to loop and call paintListBoxItem() in my paint() function? I ask because my paintListBoxItem() function is never called. And looking at the ListBox implementation of the paint() function, I don’t see anything there that performs such a loop. I can’t seem to find out how that function is supposed to get called, or if I have to do it myself.
Thanks for any advice!