Size of TextArea in PropertyList



I'm wondering if it is possible to adjust the width of a UIHint.Textarea in a PropertyType editor easily (hopefully no dojo/custom editor :))

I've made a PropertyList of a custom type in a block:

[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor))]
public virtual IList TextLinesTwo { get; set; }

And in my AdditionalProductLine class I have a string property with a UIHint.Textarea:

public string AdditionalProductLineReadMore { get; set;  }

And it seems to work fine, however when I open the editor the text area is too large for the box and causes usability issues. I would love it if I could somehow control the width of a textarea if opening via the property editor, however I cannot seem to find a way to do it.
I tried simply creating an editor descriptor that added a width style for my specific property, but that just seemed to remove the list entirely.

( metadata.EditorConfiguration.Add("style", "width: 100px");)
Apr 23, 2018 13:29

It seems using the UIHint.Longstring is giving me a much better sized TextArea in the property editor, so I'm going to use that for now.

Apr 23, 2018 14:36

I always use UIHint.LongString

For future reference, you can style any element and set the width, background color, fonts etc...

Apr 23, 2018 15:26

Hi - thanks for the reference, however I did not want to style all the text areas, just a subset in a specific situation which was why I was trying to go the Editor Descritor route, but I would properly have to my own component for that I fear.

However, seeing as LongString seems to work fine for me at them moment, I'm going with that for now to keep it simple. :)

Apr 24, 2018 9:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.