Hi Jakub,
Thank you for reporting this.
To make this work, you need to create a custom RadDropDownListElement and return a custom RadDropDownListEditableAreaElement. Inside the second custom class, you need to override the MeasureOverride method to correctly measure the elements.
public class CustomRadDropDownListElement : RadDropDownListElement
{
protected override RadDropDownListEditableAreaElement CreateTextEditorElement()
{
return new CustomListEditableAreaElement(this);
}
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadDropDownListElement);
}
}
}
public class CustomListEditableAreaElement : RadDropDownListEditableAreaElement
{
public CustomListEditableAreaElement(RadDropDownListElement owner) : base(owner)
{
}
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadDropDownListEditableAreaElement);
}
}
protected override SizeF MeasureOverride(SizeF availableSize)
{
var elementsDesiredSize = base.MeasureOverride(availableSize);
SizeF clientSize = this.GetClientRectangle(availableSize).Size;
SizeF desiredSize = this.Layout.Measure(clientSize);
// This measures the size of the underlying text box:
return this.CalculateDesiredSize(availableSize, desiredSize, elementsDesiredSize);
}
}
Regards,
Dinko | Tech Support Engineer
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.