Skip to content

Overriding ListAdaptor workflow seems convoluted #1

@JasonCDev

Description

@JasonCDev

I'm trying to start with a small change, just shrinking the width of the column that houses the Key field to allow for more space for the Value field. This seems to be set in the DrawItem() function of OrderedDictionaryListAdaptor.cs so I decided to try to override this. The more I work on this the more classes I seem to need to subclass to the point where I think I may be using your api wrong and could use some guidance.

What I've done so far:

  1. Subclassed OrderedDictionaryListAdaptor and overridden DrawItem with the width adjustment as well as the constructor but that just acts as a pass through for the base constructor.
  2. Subclassed OrderedDictionaryPropertyDrawer so I could override CreateListAdaptor() to return the new ListAdaptor.
  3. Subclassed OrderedDictionary so I could pass that class type to the new PropertyDrawer tag that specifies which class to apply the property drawer to.
  4. Subclassed OrderedDictionary<TKey, TValue> for use in the new Editable class I will be using.
  5. Created a new Editable class as per the examples included that inherits from the new custom OrderedDictionary<TKey, TValue> from step #4.

It's still not producing the result I want as it still seems to be using the base OrderedDictionaryPropertyDrawer unfortunately. I feel like perhaps I'm making this way more complicated than it needs to be, any suggestions? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions