More customization for CollectionDrawer

Issue #666 new
Igor Lepilov created an issue

When working with Odin, there was a lot of cases when CollectionDrawer need to be modified more, that it currently allows, but there was no other way to do it than to copy it from sources and modify it directly, creating a lot of copy-paste code, that may break on major Odin update.

I can suggest 2 ways to deal with it:

  1. Add more options to ListDrawerSettings. This will make it more consistent, but may still restrict user’s options for some cases
  2. Create custom CollectionDrawer class with a lot of virtual methods to be overridden, that can be extended and called from custom drawers.

Things I usually try to do when I need more collection drawer options:

  1. I want to draw some property instead of label in the list’s header. It’s possible now by disabling literally everything, but it forces you to manually write all default stuff from the header, including creation of new items.
  2. When you want to add button on the left of “add” button.
  3. I had to make a copy to CollectionDrawer to make it possible to draw it as grid. It allowed to draw multiple items in single row: you either set number of columns, on width of single item. It didn’t require much changes from original code, so such thing can be easily implemented to current ListDrawerSettings as option.
  4. Disable header completely, so you can draw it manually with more options
  5. Make header multi-lined, so you can fit some extra data there.
  6. Draw some properties below header (if expanded), but before list items

Comments (1)

  1. Log in to comment