开发者

C# Adding a long string to combobox

In my window application i created a Combobox. My开发者_如何学运维 requirement is like, if i add a long string to combobox and when i will expend that combobox, in the list view that string should come completely.


Modify the DropDownWidth property of your combobox object to accomodate long strings.


Look at this answer comboBox width depending on longest item - it explains that you can use MeasureString to measure the length of the text for all of the items, then I would recommend padding it by at least 24 pixels, and then set the length.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜