When i was having problems with the PopupMenu, i thought it may have been down to not using individual components for my TreeView. I changed from using the paint functions to having a dedicated Component be created, and having that paint itself the usual way.
Now that i know the PopupMenu itself was at fault, do you think it would be better for me to go back to the paint method (and have the item itself be responsible for creating the PopupMenu etc… rather than a component) or are there other problems i may face?
My DataBrowser component (the source of which i’ll be posting once i’ve tackled this issue) displays subclasses of a BrowsableData type. My original system gave the paint functions to this type, which had a default implementation using a nice theme, with the option to display various fields on it. These were virtual so you could set the way it will be displayed directly in your data type’s definition, with the alternative option of creating a special component for a specific type of browsable data.
I changed it to use a BrowserItemComponent instead, and when i did this the debug build was a lot slower at scrolling - presumably from debug stuff carried out when handling many components.
Is it actually better to just use the item’s paint functions by default? Or is there really no issue here?