changin下拉列表的默认宽度和高度 [英] changin the default width and height of the dropdownlist
问题描述
我想要一个足够宽的下拉列表来容纳主控件显示区下拉菜单中的大项目(例如,MX Combobox功能的下拉列表)
请在这里指导我。你应该创建自定义的DropDownList(扩展原来的)并覆盖 dataProvider
setter和 measure()
方法。在 dataProvider
setter中,您应该调用 invalidateSize()
,并且您应该迭代数据提供程序并找到最大的标签你可以给标签分配新的文本并比较它们的宽度)。
i want a dropdownlist that is wide enough to accommodate the larger item in the dropdown in display area of the main control.(.i.e. dropdownlist with the functionality of MX Combobox) please guide me on this .
You should create custom DropDownList (extending original) and override dataProvider
setter and measure()
method. In dataProvider
setter you should invoke invalidateSize()
and in measure you should iterate your data provider and find the largest label (you can assign new text to the label and compare their width).
这篇关于changin下拉列表的默认宽度和高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!