本文介绍了如何把一个组合框换行/制表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 CSV 文件,其中包含的各种项目。其中一些项目我放入组合框。我怎么可以放在 CSV 文件中的换行和/或标签,因此将显示为组合框里面换行/标签?我曾尝试 \ t ,但它只是显示那些在组合框中。

I have a CSV file which holds various items. Some of these items I put into a combobox. How can I put a newline and/or tab in the CSV file so it will show up as a newline/tab inside the combobox? I have tried \t and \n but it just shows those in the combobox.

推荐答案

基本组合框不支持特殊字符,像这样为它的显示器,它们将被忽略。如果你需要这种类型的功能,你需要重写的OnDrawItem 方法,借鉴自己的这些项目 - 我不建议这样做。另一种选择是使用了更先进的组合框从这样的公司或的Telerik Infragistics的。

The base ComboBox doesn't support special characters like this for its display, they will simply be ignored. If you need this type of functionality you'll need to override the OnDrawItem method and draw those items on your own - I do not recommend this. Another option would be to use a more advanced ComboBox from a company like Telerik or Infragistics.

这篇关于如何把一个组合框换行/制表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 21:13