3 Answers, 1 is accepted
Hello Dan,
The ListBox is designed to adds a vertical scrollbar when the height of the items exceeds its own height so they are still fit within the widget. The following Dojo demo demonstrated this behavior.
Let me know if this clarifies the question or if the inquiry is different please share more details so I can advise further.
Regards,
Nikolay
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Nikolay,
That is not what I meant. I have a list box with 7 or 8 items that have a short text. And I want for the listbox to have the width that will fit those items. The items are translatable so in some languages the text might be 100px and in some languages the text might be 150px so I need for the listbox to have the width auto.
Also I should mention that the height should be fixed so a scrollbar might appear.
Hi Dan,
Thank you for clarifying the scenario.
In this case, the ListBox can accept a fixed height and auto width with the following CSS:
<style>
#example .k-listbox {
width: auto;
height: 200px;
}
</style>
Please take a look at the following Doj and let me know if this is what you are looking for:
Regards,
Nikolay
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.