且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在组合框中放置换行符/制表符

更新时间:2022-05-10 09:13:24

基础 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.