问题描述
我有一个 CSV
文件,其中包含各种项目.我将其中一些项目放入组合框.如何在 CSV
文件中放置换行符和/或制表符,使其在组合框中显示为换行符/制表符?我试过 和
但它只显示在组合框中.
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 and
but it just shows those in the combobox.
推荐答案
基础 ComboBox
不支持显示这样的特殊字符,它们将被忽略.如果您需要这种类型的功能,您需要覆盖 OnDrawItem
方法并自己绘制这些项目 - 我不建议这样做.另一种选择是使用来自 Telerik 或 Infragistics 等公司的更高级的 ComboBox
.
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.
这篇关于如何在组合框中放置换行符/制表符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!